提交 814b6d17 编写于 作者: D Dmitry Torokhov 提交者: Jiri Kosina

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: NDmitry Torokhov <dmitry.torokhov@gmail.com>
Reviewed-by: NGuenter Roeck <groeck@chromium.org>
Reviewed-by: NBenson Leung <bleung@chromium.org>
Signed-off-by: NJiri Kosina <jkosina@suse.cz>
上级 2a5e597c
......@@ -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);
}
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册