projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7e72442
)
drivers: mcb: directly use ida_alloc()/free()
author
keliu
<liuke94@huawei.com>
Tue, 12 Jul 2022 06:50:08 +0000
(23:50 -0700)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Tue, 12 Jul 2022 07:04:55 +0000
(09:04 +0200)
Use ida_alloc()/ida_free() instead of deprecated
ida_simple_get()/ida_simple_remove() .
Signed-off-by: keliu <liuke94@huawei.com>
Signed-off-by: Johannes Thumshirn <jth@kernel.org>
Link:
https://lore.kernel.org/r/480676bee970da16bf1fa8565277240014395ba3.1657607743.git.johannes.thumshirn@wdc.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/mcb/mcb-core.c
patch
|
blob
|
history
diff --git
a/drivers/mcb/mcb-core.c
b/drivers/mcb/mcb-core.c
index
cf128b3
..
338fc88
100644
(file)
--- a/
drivers/mcb/mcb-core.c
+++ b/
drivers/mcb/mcb-core.c
@@
-254,7
+254,7
@@
static void mcb_free_bus(struct device *dev)
struct mcb_bus *bus = to_mcb_bus(dev);
put_device(bus->carrier);
- ida_
simple_remov
e(&mcb_ida, bus->bus_nr);
+ ida_
fre
e(&mcb_ida, bus->bus_nr);
kfree(bus);
}
@@
-273,7
+273,7
@@
struct mcb_bus *mcb_alloc_bus(struct device *carrier)
if (!bus)
return ERR_PTR(-ENOMEM);
- bus_nr = ida_
simple_get(&mcb_ida, 0, 0
, GFP_KERNEL);
+ bus_nr = ida_
alloc(&mcb_ida
, GFP_KERNEL);
if (bus_nr < 0) {
kfree(bus);
return ERR_PTR(bus_nr);