diff options
author | Bo Liu <liubo03@inspur.com> | 2022-06-16 08:50:52 +0300 |
---|---|---|
committer | Sudeep Holla <sudeep.holla@arm.com> | 2022-06-27 18:58:14 +0300 |
commit | 4ce7e51dc712f8a006ce6abcc49f788c79287c03 (patch) | |
tree | 255e65bdd65ab1d9a2fd9905119ae0db6a5789aa /drivers/firmware | |
parent | 75c8f430d8596cf16634337fec8aec50e7b0feed (diff) | |
download | linux-4ce7e51dc712f8a006ce6abcc49f788c79287c03.tar.xz |
firmware: arm_scmi: Remove usage of the deprecated ida_simple_xxx API
Replace the deprecated ida_simple_{get,remove} with ida_{alloc,free}.
Link: https://lore.kernel.org/r/20220616055052.4559-1-liubo03@inspur.com
Signed-off-by: Bo Liu <liubo03@inspur.com>
[sudeep.holla: Replace ida_alloc_min with ida_alloc as suggested by Cristian]
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Diffstat (limited to 'drivers/firmware')
-rw-r--r-- | drivers/firmware/arm_scmi/bus.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/firmware/arm_scmi/bus.c b/drivers/firmware/arm_scmi/bus.c index f6fe723ab869..d4e23101448a 100644 --- a/drivers/firmware/arm_scmi/bus.c +++ b/drivers/firmware/arm_scmi/bus.c @@ -181,7 +181,7 @@ scmi_device_create(struct device_node *np, struct device *parent, int protocol, return NULL; } - id = ida_simple_get(&scmi_bus_id, 1, 0, GFP_KERNEL); + id = ida_alloc_min(&scmi_bus_id, 1, GFP_KERNEL); if (id < 0) { kfree_const(scmi_dev->name); kfree(scmi_dev); @@ -204,7 +204,7 @@ scmi_device_create(struct device_node *np, struct device *parent, int protocol, put_dev: kfree_const(scmi_dev->name); put_device(&scmi_dev->dev); - ida_simple_remove(&scmi_bus_id, id); + ida_free(&scmi_bus_id, id); return NULL; } @@ -212,7 +212,7 @@ void scmi_device_destroy(struct scmi_device *scmi_dev) { kfree_const(scmi_dev->name); scmi_handle_put(scmi_dev->handle); - ida_simple_remove(&scmi_bus_id, scmi_dev->id); + ida_free(&scmi_bus_id, scmi_dev->id); device_unregister(&scmi_dev->dev); } |