diff mbox series

[1/5] firmware: arm_scmi: Remove deprecated ida_simple_ calls

Message ID 20220623124742.2492164-2-cristian.marussi@arm.com (mailing list archive)
State New, archived
Headers show
Series Introduce SCMI System Power Control driver | expand

Commit Message

Cristian Marussi June 23, 2022, 12:47 p.m. UTC
Remove deprecated calls to ida_simple_get/ida_simple_remove.

Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
---
 drivers/firmware/arm_scmi/bus.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Sudeep Holla July 1, 2022, 1:46 p.m. UTC | #1
On Thu, Jun 23, 2022 at 01:47:38PM +0100, Cristian Marussi wrote:
> Remove deprecated calls to ida_simple_get/ida_simple_remove.
> 
 
As you are aware, similar patch is already merged [1].
diff mbox series

Patch

diff --git a/drivers/firmware/arm_scmi/bus.c b/drivers/firmware/arm_scmi/bus.c
index e95085a66bc4..a7cbf4d09081 100644
--- a/drivers/firmware/arm_scmi/bus.c
+++ b/drivers/firmware/arm_scmi/bus.c
@@ -192,7 +192,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(&scmi_bus_id, GFP_KERNEL);
 	if (id < 0) {
 		kfree_const(scmi_dev->name);
 		kfree(scmi_dev);
@@ -215,7 +215,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;
 }
 
@@ -223,7 +223,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);
 }