]> git.baikalelectronics.ru Git - kernel.git/commit
HID: rmi: Make sure the HID device is opened on resume
authorLyude <lyude@redhat.com>
Sun, 23 Jul 2017 01:15:09 +0000 (21:15 -0400)
committerJiri Kosina <jkosina@suse.cz>
Fri, 8 Sep 2017 13:00:52 +0000 (15:00 +0200)
commit3ec096140d6329fe9a1d3ac4e5dd3bfc9b7f3aa4
tree2c358932e4a0e67fc584cb1fa805d89a80852046
parent73d8f55d126491f9559ece5e5dbb2195fc3af17c
HID: rmi: Make sure the HID device is opened on resume

So it looks like that suspend/resume has actually always been broken on
hid-rmi. The fact it worked was a rather silly coincidence that was
relying on the HID device to already be opened upon resume. This means
that so long as anything was reading the /dev/input/eventX node for for
an RMI device, it would suspend and resume correctly. As well, if
nothing happened to be keeping the HID device away it would shut off,
then the RMI driver would get confused on resume when it stopped
responding and explode.

So, call hid_hw_open() in rmi_post_resume() so we make sure that the
device is alive before we try talking to it.

This fixes RMI device suspend/resume over HID.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=196851
[jkosina@suse.cz: removed useless hunk that was zero-initializing 'ret']
Signed-off-by: Lyude <lyude@redhat.com>
Cc: Andrew Duggan <aduggan@synaptics.com>
Cc: stable@vger.kernel.org
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-rmi.c