Skip to content

Commit 4ce7e51

Browse files
Bo Liusudeep-holla
authored andcommitted
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/[email protected] Signed-off-by: Bo Liu <[email protected]> [sudeep.holla: Replace ida_alloc_min with ida_alloc as suggested by Cristian] Signed-off-by: Sudeep Holla <[email protected]>
1 parent 75c8f43 commit 4ce7e51

File tree

1 file changed

+3
-3
lines changed
  • drivers/firmware/arm_scmi

1 file changed

+3
-3
lines changed

drivers/firmware/arm_scmi/bus.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ scmi_device_create(struct device_node *np, struct device *parent, int protocol,
181181
return NULL;
182182
}
183183

184-
id = ida_simple_get(&scmi_bus_id, 1, 0, GFP_KERNEL);
184+
id = ida_alloc_min(&scmi_bus_id, 1, GFP_KERNEL);
185185
if (id < 0) {
186186
kfree_const(scmi_dev->name);
187187
kfree(scmi_dev);
@@ -204,15 +204,15 @@ scmi_device_create(struct device_node *np, struct device *parent, int protocol,
204204
put_dev:
205205
kfree_const(scmi_dev->name);
206206
put_device(&scmi_dev->dev);
207-
ida_simple_remove(&scmi_bus_id, id);
207+
ida_free(&scmi_bus_id, id);
208208
return NULL;
209209
}
210210

211211
void scmi_device_destroy(struct scmi_device *scmi_dev)
212212
{
213213
kfree_const(scmi_dev->name);
214214
scmi_handle_put(scmi_dev->handle);
215-
ida_simple_remove(&scmi_bus_id, scmi_dev->id);
215+
ida_free(&scmi_bus_id, scmi_dev->id);
216216
device_unregister(&scmi_dev->dev);
217217
}
218218

0 commit comments

Comments
 (0)