Replace the deprecated ida_simple_{get,remove} with ida_{alloc,free}.
Unified · Split
| @@ -181,7 +181,7 @@ scmi_device_create(struct device_node *np, struct device *parent, int protocol, · 180 unmodified lines | ||
| 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,7 +204,7 @@ scmi_device_create(struct device_node *np, struct device *parent, int protocol, · 16 unmodified lines | ||
| 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,7 +212,7 @@ void scmi_device_destroy(struct scmi_device *scmi_dev) · 1 unmodified line | ||
| 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 | |