Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Bo Liu and committed by
Sudeep Holla
4ce7e51d 75c8f430

+3 -3
+3 -3
drivers/firmware/arm_scmi/bus.c
··· 181 181 return NULL; 182 182 } 183 183 184 - id = ida_simple_get(&scmi_bus_id, 1, 0, GFP_KERNEL); 184 + id = ida_alloc_min(&scmi_bus_id, 1, GFP_KERNEL); 185 185 if (id < 0) { 186 186 kfree_const(scmi_dev->name); 187 187 kfree(scmi_dev); ··· 204 204 put_dev: 205 205 kfree_const(scmi_dev->name); 206 206 put_device(&scmi_dev->dev); 207 - ida_simple_remove(&scmi_bus_id, id); 207 + ida_free(&scmi_bus_id, id); 208 208 return NULL; 209 209 } 210 210 ··· 212 212 { 213 213 kfree_const(scmi_dev->name); 214 214 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); 216 216 device_unregister(&scmi_dev->dev); 217 217 } 218 218