We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 55dbc5b commit 200a289Copy full SHA for 200a289
drivers/mux/core.c
@@ -64,7 +64,7 @@ static void mux_chip_release(struct device *dev)
64
{
65
struct mux_chip *mux_chip = to_mux_chip(dev);
66
67
- ida_simple_remove(&mux_ida, mux_chip->id);
+ ida_free(&mux_ida, mux_chip->id);
68
kfree(mux_chip);
69
}
70
@@ -111,7 +111,7 @@ struct mux_chip *mux_chip_alloc(struct device *dev,
111
mux_chip->dev.of_node = dev->of_node;
112
dev_set_drvdata(&mux_chip->dev, mux_chip);
113
114
- mux_chip->id = ida_simple_get(&mux_ida, 0, 0, GFP_KERNEL);
+ mux_chip->id = ida_alloc(&mux_ida, GFP_KERNEL);
115
if (mux_chip->id < 0) {
116
int err = mux_chip->id;
117
0 commit comments