Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <christophe.jaillet@wanadoo.fr>
Cc: Rodolfo Giometti <giometti@enneenne.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

Christophe JAILLET and committed by
Andrew Morton
55dbc5b5 0f373e6d

+3 -3
+3 -3
drivers/pps/clients/pps_parport.c
··· 148 148 return; 149 149 } 150 150 151 - index = ida_simple_get(&pps_client_index, 0, 0, GFP_KERNEL); 151 + index = ida_alloc(&pps_client_index, GFP_KERNEL); 152 152 memset(&pps_client_cb, 0, sizeof(pps_client_cb)); 153 153 pps_client_cb.private = device; 154 154 pps_client_cb.irq_func = parport_irq; ··· 188 188 err_unregister_dev: 189 189 parport_unregister_device(device->pardev); 190 190 err_free: 191 - ida_simple_remove(&pps_client_index, index); 191 + ida_free(&pps_client_index, index); 192 192 kfree(device); 193 193 } 194 194 ··· 208 208 pps_unregister_source(device->pps); 209 209 parport_release(pardev); 210 210 parport_unregister_device(pardev); 211 - ida_simple_remove(&pps_client_index, device->index); 211 + ida_free(&pps_client_index, device->index); 212 212 kfree(device); 213 213 } 214 214