pps: clients: Directly use ida_alloc()/free()
PATCH 1/1 pps: clients: Directly use ida_alloc()/free()
Use ida_alloc()/ida_free() instead of deprecated
ida_simple_get()/ida_simple_remove() .
Signed-off-by keliu <[email protected]>
--- drivers/pps/clients/pps_parport.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/pps/clients/pps_parport.c +3 -3
@@ -148,7 +148,7 @@ static void parport_attach(struct parport *port)return ; } - index =ida_simple_get (&pps_client_index,0 ,0 ,GFP_KERNEL ); + index =ida_alloc (&pps_client_index,GFP_KERNEL );memset (&pps_client_cb,0 ,sizeof (pps_client_cb)); pps_client_cb.private = device; pps_client_cb.irq_func = parport_irq;
@@ -188,7 +188,7 @@ static void parport_attach(struct parport *port) err_unregister_dev:parport_unregister_device (device->pardev); err_free: -ida_simple_remove (&pps_client_index, index); +ida_free (&pps_client_index, index);kfree (device); }
@@ -208,7 +208,7 @@ static void parport_detach(struct parport *port)pps_unregister_source (device->pps);parport_release (pardev);parport_unregister_device (pardev); -ida_simple_remove (&pps_client_index, device->index); +ida_free (&pps_client_index, device->index);kfree (device); }
Signature · 1 line
2.25.1
Quoted 4 lines · keliu
Use ida_alloc()/ida_free() instead of deprecated
ida_simple_get()/ida_simple_remove() .Signed-off-by keliu <[email protected]>
Acked-by Rodolfo Giometti <[email protected]>
Quoted 35 lines
--- drivers/pps/clients/pps_parport.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)drivers/pps/clients/pps_parport.c +3
-3@@ -148,7 +148,7 @@ static void parport_attach(struct parport *port)return ; } - index =ida_simple_get (&pps_client_index,0 ,0 ,GFP_KERNEL ); + index =ida_alloc (&pps_client_index,GFP_KERNEL );memset (&pps_client_cb,0 ,sizeof (pps_client_cb)); pps_client_cb.private = device; pps_client_cb.irq_func = parport_irq;@@ -188,7 +188,7 @@ static void parport_attach(struct parport *port) err_unregister_dev:parport_unregister_device (device->pardev); err_free: -ida_simple_remove (&pps_client_index, index); +ida_free (&pps_client_index, index);kfree (device); }@@ -208,7 +208,7 @@ static void parport_detach(struct parport *port)pps_unregister_source (device->pps);parport_release (pardev);parport_unregister_device (pardev); -ida_simple_remove (&pps_client_index, device->index); +ida_free (&pps_client_index, device->index);kfree (device); }
Signature · 4 lines
GNU/Linux Solutions e-mail: [email protected] Linux Device Driver [email protected] Embedded Systems phone: +39 349 2432127 UNIX programming skype: rodolfo.giometti