projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
54d0999
)
drivers: spmi: Directly use ida_alloc()/free()
author
keliu
<liuke94@huawei.com>
Fri, 30 Sep 2022 00:50:10 +0000
(17:50 -0700)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Fri, 30 Sep 2022 12:33:22 +0000
(14:33 +0200)
Use ida_alloc()/ida_free() instead of deprecated
ida_simple_get()/ida_simple_remove() .
Signed-off-by: keliu <liuke94@huawei.com>
Link:
https://lore.kernel.org/r/20220527071338.2359733-1-liuke94@huawei.com
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Link:
https://lore.kernel.org/r/20220930005019.2663064-2-sboyd@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/spmi/spmi.c
patch
|
blob
|
history
diff --git
a/drivers/spmi/spmi.c
b/drivers/spmi/spmi.c
index a456ce5141e16379ecb7b21553178527e30260e9..55381592bb5a698b8cf10cc6f54cfe21753b22ac 100644
(file)
--- a/
drivers/spmi/spmi.c
+++ b/
drivers/spmi/spmi.c
@@
-35,7
+35,7
@@
static void spmi_ctrl_release(struct device *dev)
{
struct spmi_controller *ctrl = to_spmi_controller(dev);
- ida_
simple_remov
e(&ctrl_ida, ctrl->nr);
+ ida_
fre
e(&ctrl_ida, ctrl->nr);
kfree(ctrl);
}
@@
-457,7
+457,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");