|
|
@@ -1924,7 +1924,6 @@ static void wacom_wac_pad_event(struct hid_device *hdev, struct hid_field *field
|
|
|
struct wacom_features *features = &wacom_wac->features;
|
|
|
unsigned equivalent_usage = wacom_equivalent_usage(usage->hid);
|
|
|
int i;
|
|
|
- bool is_touch_on = value;
|
|
|
bool do_report = false;
|
|
|
|
|
|
/*
|
|
|
@@ -1969,16 +1968,17 @@ static void wacom_wac_pad_event(struct hid_device *hdev, struct hid_field *field
|
|
|
break;
|
|
|
|
|
|
case WACOM_HID_WD_MUTE_DEVICE:
|
|
|
- if (wacom_wac->shared->touch_input && value) {
|
|
|
- wacom_wac->shared->is_touch_on = !wacom_wac->shared->is_touch_on;
|
|
|
- is_touch_on = wacom_wac->shared->is_touch_on;
|
|
|
- }
|
|
|
-
|
|
|
- /* fall through*/
|
|
|
case WACOM_HID_WD_TOUCHONOFF:
|
|
|
if (wacom_wac->shared->touch_input) {
|
|
|
+ bool *is_touch_on = &wacom_wac->shared->is_touch_on;
|
|
|
+
|
|
|
+ if (equivalent_usage == WACOM_HID_WD_MUTE_DEVICE && value)
|
|
|
+ *is_touch_on = !(*is_touch_on);
|
|
|
+ else if (equivalent_usage == WACOM_HID_WD_TOUCHONOFF)
|
|
|
+ *is_touch_on = value;
|
|
|
+
|
|
|
input_report_switch(wacom_wac->shared->touch_input,
|
|
|
- SW_MUTE_DEVICE, !is_touch_on);
|
|
|
+ SW_MUTE_DEVICE, !(*is_touch_on));
|
|
|
input_sync(wacom_wac->shared->touch_input);
|
|
|
}
|
|
|
break;
|