mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
hp_accel: fix race in device removal
The work queue has to be flushed after the device has been made inaccessible. The patch closes a window during which a work queue might remain active after the device is removed and would then lead to ACPI calls with undefined behavior. Signed-off-by: Oliver Neukum <[email protected]> Acked-by: Eric Piel <[email protected]> Acked-by: Pavel Machek <[email protected]> Cc: Pavel Herrmann <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
a3ed2a1571
commit
06efbeb4a4
1 changed files with 1 additions and 1 deletions
|
|
@ -328,8 +328,8 @@ static int lis3lv02d_remove(struct acpi_device *device, int type)
|
|||
lis3lv02d_joystick_disable();
|
||||
lis3lv02d_poweroff(&lis3_dev);
|
||||
|
||||
flush_work(&hpled_led.work);
|
||||
led_classdev_unregister(&hpled_led.led_classdev);
|
||||
flush_work(&hpled_led.work);
|
||||
|
||||
return lis3lv02d_remove_fs(&lis3_dev);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue