mirror of
https://github.com/torvalds/linux.git
synced 2026-05-24 15:12:13 +02:00
media: atomisp: use new ida API
The old ida API got replaced by a new one, with avoids locking issues. As the old API was removed, start using the new one, as defined by changesetb03f8e43c9("ida: Remove old API"). Fixes:b03f8e43c9("ida: Remove old API") Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
This commit is contained in:
parent
8d564cd28c
commit
c1b70ae094
|
|
@ -125,7 +125,7 @@ void atomisp_acc_release(struct atomisp_sub_device *asd)
|
|||
/* Unload all loaded acceleration binaries */
|
||||
list_for_each_entry_safe(acc_fw, ta, &asd->acc.fw, list) {
|
||||
list_del(&acc_fw->list);
|
||||
ida_remove(&asd->acc.ida, acc_fw->handle);
|
||||
ida_free(&asd->acc.ida, acc_fw->handle);
|
||||
acc_free_fw(acc_fw);
|
||||
}
|
||||
|
||||
|
|
@ -175,8 +175,8 @@ int atomisp_acc_load_to_pipe(struct atomisp_sub_device *asd,
|
|||
return -EFAULT;
|
||||
}
|
||||
|
||||
if (!ida_pre_get(&asd->acc.ida, GFP_KERNEL) ||
|
||||
ida_get_new_above(&asd->acc.ida, 1, &handle)) {
|
||||
handle = ida_alloc(&asd->acc.ida, GFP_KERNEL);
|
||||
if (handle < 0) {
|
||||
acc_free_fw(acc_fw);
|
||||
return -ENOSPC;
|
||||
}
|
||||
|
|
@ -234,7 +234,7 @@ int atomisp_acc_unload(struct atomisp_sub_device *asd, unsigned int *handle)
|
|||
return -EINVAL;
|
||||
|
||||
list_del(&acc_fw->list);
|
||||
ida_remove(&asd->acc.ida, acc_fw->handle);
|
||||
ida_free(&asd->acc.ida, acc_fw->handle);
|
||||
acc_free_fw(acc_fw);
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user