summaryrefslogtreecommitdiff
path: root/drivers/input/touchscreen/usbtouchscreen.c
diff options
context:
space:
mode:
authorMarcus Folkesson <marcus.folkesson@gmail.com>2018-03-17 20:52:05 +0300
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2018-03-17 21:05:18 +0300
commit553d16af23afdf3b6aa12ce237e469c3f6237ba3 (patch)
treec5a3a8e43b94e9cfa174645f1760d20140104a0e /drivers/input/touchscreen/usbtouchscreen.c
parent1f701f6d10a4578b7b2389fd80e4ef28aeb80057 (diff)
downloadlinux-553d16af23afdf3b6aa12ce237e469c3f6237ba3.tar.xz
Input: pegasus_notetaker - 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 (pegasus->dev->users && usb_submit_urb(pegasus->irq, GFP_NOIO) < 0) retval = -EIO; The same URB will then be fail when resubmitted in pegasus_open(). Introduce pegasus->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/input/touchscreen/usbtouchscreen.c')
0 files changed, 0 insertions, 0 deletions