Skip to content

Commit 55dbc5b

Browse files
tititiou36akpm00
authored andcommitted
pps: remove usage of the deprecated ida_simple_xx() API
ida_alloc() and ida_free() should be preferred to the deprecated ida_simple_get() and ida_simple_remove(). This is less verbose. Link: https://lkml.kernel.org/r/9f681747d446b874952a892491387d79ffe565a9.1713089394.git.christophe.jaillet@wanadoo.fr Signed-off-by: Christophe JAILLET <[email protected]> Cc: Rodolfo Giometti <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent 0f373e6 commit 55dbc5b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/pps/clients/pps_parport.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ static void parport_attach(struct parport *port)
148148
return;
149149
}
150150

151-
index = ida_simple_get(&pps_client_index, 0, 0, GFP_KERNEL);
151+
index = ida_alloc(&pps_client_index, GFP_KERNEL);
152152
memset(&pps_client_cb, 0, sizeof(pps_client_cb));
153153
pps_client_cb.private = device;
154154
pps_client_cb.irq_func = parport_irq;
@@ -188,7 +188,7 @@ static void parport_attach(struct parport *port)
188188
err_unregister_dev:
189189
parport_unregister_device(device->pardev);
190190
err_free:
191-
ida_simple_remove(&pps_client_index, index);
191+
ida_free(&pps_client_index, index);
192192
kfree(device);
193193
}
194194

@@ -208,7 +208,7 @@ static void parport_detach(struct parport *port)
208208
pps_unregister_source(device->pps);
209209
parport_release(pardev);
210210
parport_unregister_device(pardev);
211-
ida_simple_remove(&pps_client_index, device->index);
211+
ida_free(&pps_client_index, device->index);
212212
kfree(device);
213213
}
214214

0 commit comments

Comments
 (0)