diff options
author | Marcus Folkesson <marcus.folkesson@gmail.com> | 2018-03-17 18:54:13 +0100 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2018-03-27 00:22:16 +0200 |
commit | 85f46fbf5e242ef923fd313722e65cb6d2170149 (patch) | |
tree | a20e6021842e99f6a828a3cb3a4529e36cf2f257 /drivers/auxdisplay | |
parent | Input: usbtouchscreen - fix deadlock in autosuspend (diff) | |
download | linux-85f46fbf5e242ef923fd313722e65cb6d2170149.tar.xz linux-85f46fbf5e242ef923fd313722e65cb6d2170149.zip |
Input: usbtouchscreen - do not rely on input_dev->users
If the device is unused and suspended, a call to open will cause the
device to autoresume through the call to usb_autopm_get_interface().
input_dev->users is already incremented by the input subsystem,
therefore this expression will always be evaluated to true:
if (input->users || usbtouch->type->irq_always)
result = usb_submit_urb(usbtouch->irq, GFP_NOIO);
The same URB will then be fail when resubmitted in usbtouch_open().
Introduce usbtouch->is_open to keep track of the state instead.
Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/auxdisplay')
0 files changed, 0 insertions, 0 deletions