diff options
author | Jason Gerecke <killertofu@gmail.com> | 2015-08-03 13:17:04 -0400 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.com> | 2015-08-04 09:39:20 -0400 |
commit | ccad85cc1ee34509840e5af80a436ceaf0b71edb (patch) | |
tree | ec6870d5cc6fd515158075ff8141c3da208f13bc | |
parent | 8dc8641e619228153ab0bc609f9f534126e87c08 (diff) |
HID: wacom: Replace WACOM_QUIRK_MONITOR with WACOM_DEVICETYPE_WL_MONITOR
The monitor interface on the wireless receiver is more logically expressed
as a type of device instead of a quirk.
Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
-rw-r--r-- | drivers/hid/wacom_sys.c | 6 | ||||
-rw-r--r-- | drivers/hid/wacom_wac.c | 4 | ||||
-rw-r--r-- | drivers/hid/wacom_wac.h | 2 |
3 files changed, 5 insertions, 7 deletions
diff --git a/drivers/hid/wacom_sys.c b/drivers/hid/wacom_sys.c index a334332fbb8f..13834bae227c 100644 --- a/drivers/hid/wacom_sys.c +++ b/drivers/hid/wacom_sys.c | |||
@@ -454,7 +454,7 @@ static void wacom_retrieve_hid_descriptor(struct hid_device *hdev, | |||
454 | */ | 454 | */ |
455 | if (features->type == WIRELESS) { | 455 | if (features->type == WIRELESS) { |
456 | if (intf->cur_altsetting->desc.bInterfaceNumber == 0) { | 456 | if (intf->cur_altsetting->desc.bInterfaceNumber == 0) { |
457 | features->device_type = WACOM_DEVICETYPE_NONE; | 457 | features->device_type = WACOM_DEVICETYPE_WL_MONITOR; |
458 | } else if (intf->cur_altsetting->desc.bInterfaceNumber == 2) { | 458 | } else if (intf->cur_altsetting->desc.bInterfaceNumber == 2) { |
459 | features->device_type |= WACOM_DEVICETYPE_TOUCH; | 459 | features->device_type |= WACOM_DEVICETYPE_TOUCH; |
460 | } | 460 | } |
@@ -1581,7 +1581,7 @@ static int wacom_probe(struct hid_device *hdev, | |||
1581 | if (error) | 1581 | if (error) |
1582 | goto fail_shared_data; | 1582 | goto fail_shared_data; |
1583 | 1583 | ||
1584 | if (!(features->quirks & WACOM_QUIRK_MONITOR) && | 1584 | if (!(features->device_type & WACOM_DEVICETYPE_WL_MONITOR) && |
1585 | (features->quirks & WACOM_QUIRK_BATTERY)) { | 1585 | (features->quirks & WACOM_QUIRK_BATTERY)) { |
1586 | error = wacom_initialize_battery(wacom); | 1586 | error = wacom_initialize_battery(wacom); |
1587 | if (error) | 1587 | if (error) |
@@ -1615,7 +1615,7 @@ static int wacom_probe(struct hid_device *hdev, | |||
1615 | /* Note that if query fails it is not a hard failure */ | 1615 | /* Note that if query fails it is not a hard failure */ |
1616 | wacom_query_tablet_data(hdev, features); | 1616 | wacom_query_tablet_data(hdev, features); |
1617 | 1617 | ||
1618 | if (features->quirks & WACOM_QUIRK_MONITOR) | 1618 | if (features->device_type & WACOM_DEVICETYPE_WL_MONITOR) |
1619 | error = hid_hw_open(hdev); | 1619 | error = hid_hw_open(hdev); |
1620 | 1620 | ||
1621 | if (wacom_wac->features.type == INTUOSHT && | 1621 | if (wacom_wac->features.type == INTUOSHT && |
diff --git a/drivers/hid/wacom_wac.c b/drivers/hid/wacom_wac.c index 280deb293ae2..82bb0d38fc8d 100644 --- a/drivers/hid/wacom_wac.c +++ b/drivers/hid/wacom_wac.c | |||
@@ -2330,9 +2330,7 @@ void wacom_setup_device_quirks(struct wacom *wacom) | |||
2330 | /* monitor never has input and pen/touch have delayed create */ | 2330 | /* monitor never has input and pen/touch have delayed create */ |
2331 | features->quirks |= WACOM_QUIRK_NO_INPUT; | 2331 | features->quirks |= WACOM_QUIRK_NO_INPUT; |
2332 | 2332 | ||
2333 | /* must be monitor interface if no device_type set */ | 2333 | if (features->device_type == WACOM_DEVICETYPE_WL_MONITOR) { |
2334 | if (features->device_type == WACOM_DEVICETYPE_NONE) { | ||
2335 | features->quirks |= WACOM_QUIRK_MONITOR; | ||
2336 | features->quirks |= WACOM_QUIRK_BATTERY; | 2334 | features->quirks |= WACOM_QUIRK_BATTERY; |
2337 | } | 2335 | } |
2338 | } | 2336 | } |
diff --git a/drivers/hid/wacom_wac.h b/drivers/hid/wacom_wac.h index c245a6628224..87df674e210c 100644 --- a/drivers/hid/wacom_wac.h +++ b/drivers/hid/wacom_wac.h | |||
@@ -69,7 +69,6 @@ | |||
69 | /* device quirks */ | 69 | /* device quirks */ |
70 | #define WACOM_QUIRK_BBTOUCH_LOWRES 0x0001 | 70 | #define WACOM_QUIRK_BBTOUCH_LOWRES 0x0001 |
71 | #define WACOM_QUIRK_NO_INPUT 0x0002 | 71 | #define WACOM_QUIRK_NO_INPUT 0x0002 |
72 | #define WACOM_QUIRK_MONITOR 0x0004 | ||
73 | #define WACOM_QUIRK_BATTERY 0x0008 | 72 | #define WACOM_QUIRK_BATTERY 0x0008 |
74 | 73 | ||
75 | /* device types */ | 74 | /* device types */ |
@@ -77,6 +76,7 @@ | |||
77 | #define WACOM_DEVICETYPE_PEN 0x0001 | 76 | #define WACOM_DEVICETYPE_PEN 0x0001 |
78 | #define WACOM_DEVICETYPE_TOUCH 0x0002 | 77 | #define WACOM_DEVICETYPE_TOUCH 0x0002 |
79 | #define WACOM_DEVICETYPE_PAD 0x0004 | 78 | #define WACOM_DEVICETYPE_PAD 0x0004 |
79 | #define WACOM_DEVICETYPE_WL_MONITOR 0x0008 | ||
80 | 80 | ||
81 | #define WACOM_VENDORDEFINED_PEN 0xff0d0001 | 81 | #define WACOM_VENDORDEFINED_PEN 0xff0d0001 |
82 | 82 | ||