mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-14 15:54:15 +08:00
HID: hidraw: fix power sequence when closing device
We should not try to bring HID device out of full power state before calling hid_hw_close(), so that transport driver operates on powered up device (making this inverse of the opening sequence). Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Reviewed-by: Guenter Roeck <groeck@chromium.org> Reviewed-by: Benson Leung <bleung@chromium.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
This commit is contained in:
parent
2a5e597c6b
commit
814b6d1748
@ -337,8 +337,8 @@ static void drop_ref(struct hidraw *hidraw, int exists_bit)
|
||||
kfree(hidraw);
|
||||
} else {
|
||||
/* close device for last reader */
|
||||
hid_hw_power(hidraw->hid, PM_HINT_NORMAL);
|
||||
hid_hw_close(hidraw->hid);
|
||||
hid_hw_power(hidraw->hid, PM_HINT_NORMAL);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user