drivers: spmi: Directly use ida_alloc()/free()
PATCH 1/1 drivers: spmi: Directly use ida_alloc()/free()
Use ida_alloc()/ida_free() instead of deprecated
ida_simple_get()/ida_simple_remove() .
Signed-off-by keliu <[email protected]>
--- drivers/spmi/spmi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/spmi/spmi.c +2 -2
@@ -35,7 +35,7 @@ static void spmi_ctrl_release(struct device *dev) {struct spmi_controller *ctrl =to_spmi_controller (dev); -ida_simple_remove (&ctrl_ida, ctrl->nr); +ida_free (&ctrl_ida, ctrl->nr);kfree (ctrl); }
@@ -440,7 +440,7 @@ struct spmi_controller *spmi_controller_alloc(struct device *parent, ctrl->dev.of_node = parent->of_node;spmi_controller_set_drvdata (ctrl, &ctrl[1 ]); - id =ida_simple_get (&ctrl_ida,0 ,0 ,GFP_KERNEL ); + id =ida_alloc (&ctrl_ida,GFP_KERNEL );if (id <0 ) {dev_err (parent,"unable to allocate SPMI controller identifier.\n" );
Signature · 1 line
2.25.1
Quoting keliu (2022-05-27 00:13:38)
Quoted 5 lines
Use ida_alloc()/ida_free() instead of deprecated
ida_simple_get()/ida_simple_remove() .Signed-off-by keliu <[email protected]>---
Applied to spmi-next