lis3: change exported function to use passed parameter
Change exported functions to use the device given as parameter instead of the global one. Signed-off-by: Ilkka Koskinen <ilkka.koskinen@nokia.com> Signed-off-by: Éric Piel <eric.piel@tremplin-utc.net> Cc: Matthew Garrett <mjg@redhat.com> Cc: Witold Pilat <witold.pilat@gmail.com> Cc: Lyall Pearce <lyall.pearce@hp.com> Cc: Malte Starostik <m-starostik@versanet.de> Cc: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com> Cc: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
committed by
Linus Torvalds
parent
d7f81d4299
commit
e1e5687d75
@@ -323,7 +323,7 @@ static int lis3lv02d_add(struct acpi_device *device)
|
||||
INIT_WORK(&hpled_led.work, delayed_set_status_worker);
|
||||
ret = led_classdev_register(NULL, &hpled_led.led_classdev);
|
||||
if (ret) {
|
||||
lis3lv02d_joystick_disable();
|
||||
lis3lv02d_joystick_disable(&lis3_dev);
|
||||
lis3lv02d_poweroff(&lis3_dev);
|
||||
flush_work(&hpled_led.work);
|
||||
return ret;
|
||||
@@ -337,7 +337,7 @@ static int lis3lv02d_remove(struct acpi_device *device, int type)
|
||||
if (!device)
|
||||
return -EINVAL;
|
||||
|
||||
lis3lv02d_joystick_disable();
|
||||
lis3lv02d_joystick_disable(&lis3_dev);
|
||||
lis3lv02d_poweroff(&lis3_dev);
|
||||
|
||||
led_classdev_unregister(&hpled_led.led_classdev);
|
||||
|
Reference in New Issue
Block a user