You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07: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:
committed by
Jiri Kosina
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user