summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorBenjamin Tissoires <benjamin.tissoires@redhat.com>2018-05-31 13:49:29 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-07-11 16:31:32 +0200
commit091b5e3f593a8d34919b6226d58c00e18fb47305 (patch)
tree2d1eb5410f3539ecbe8f2f27e48817ff54908bdb /include
parent787b882d9178c35eb2e06e974f3c37fc14829e53 (diff)
downloadlinux-stable-091b5e3f593a8d34919b6226d58c00e18fb47305.tar.gz
linux-stable-091b5e3f593a8d34919b6226d58c00e18fb47305.tar.bz2
linux-stable-091b5e3f593a8d34919b6226d58c00e18fb47305.zip
HID: core: allow concurrent registration of drivers
commit 8f732850df1b2b4d8d719f7e606dfb3050e7ea11 upstream. Detected on the Dell XPS 9365. The laptop has 2 devices that benefit from the hid-generic auto-unbinding. When those 2 devices are presented to the userspace, udev loads both wacom and hid-multitouch. When this happens, the code in __hid_bus_reprobe_drivers() is called concurrently and the second device gets reprobed twice. An other bug in the power_supply subsystem prevent to remove the wacom driver if it just finished its initialization, which basically kills the wacom node. [jkosina@suse.cz: reformat changelog a bit] Fixes c17a7476e4c4 ("HID: core: rewrite the hid-generic automatic unbind") Cc: stable@vger.kernel.org # v4.17 Tested-by: Mario Limonciello <mario.limonciello@dell.com> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/hid.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/hid.h b/include/linux/hid.h
index 26240a22978a..2a4c0900e46a 100644
--- a/include/linux/hid.h
+++ b/include/linux/hid.h
@@ -502,6 +502,7 @@ struct hid_output_fifo {
#define HID_STAT_ADDED BIT(0)
#define HID_STAT_PARSED BIT(1)
+#define HID_STAT_REPROBED BIT(3)
struct hid_input {
struct list_head list;
@@ -568,7 +569,7 @@ struct hid_device { /* device report descriptor */
bool battery_avoid_query;
#endif
- unsigned int status; /* see STAT flags above */
+ unsigned long status; /* see STAT flags above */
unsigned claimed; /* Claimed by hidinput, hiddev? */
unsigned quirks; /* Various quirks the device can pull on us */
bool io_started; /* If IO has started */