Skip to content

Commit 814b6d1

Browse files
dtorJiri Kosina
authored andcommitted
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>
1 parent 2a5e597 commit 814b6d1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/hid/hidraw.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,8 +337,8 @@ static void drop_ref(struct hidraw *hidraw, int exists_bit)
337337
kfree(hidraw);
338338
} else {
339339
/* close device for last reader */
340-
hid_hw_power(hidraw->hid, PM_HINT_NORMAL);
341340
hid_hw_close(hidraw->hid);
341+
hid_hw_power(hidraw->hid, PM_HINT_NORMAL);
342342
}
343343
}
344344
}

0 commit comments

Comments
 (0)