diff options
author | 2018-03-17 10:50:48 -0700 | |
---|---|---|
committer | 2018-03-17 11:05:18 -0700 | |
commit | ff0d2cba646dc0e195317c20a0630a5c7a2e328e (patch) | |
tree | 60e1e671639f55731ad26195b6839a039d3446bd /tools/perf/scripts/python/export-to-postgresql.py | |
parent | Input: synaptics_usb - fix deadlock in autosuspend (diff) | |
download | linux-dev-ff0d2cba646dc0e195317c20a0630a5c7a2e328e.tar.xz linux-dev-ff0d2cba646dc0e195317c20a0630a5c7a2e328e.zip |
Input: synaptics_usb - 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_dev->users || (synusb->flags & SYNUSB_IO_ALWAYS)) &&
usb_submit_urb(synusb->urb, GFP_NOIO) < 0) {
retval = -EIO;
}
The same URB will then be fail when resubmitted in synusb_open().
Introduce synusb->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 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions