summaryrefslogtreecommitdiffstats
path: root/drivers/hid/wacom.h
diff options
context:
space:
mode:
authorBenjamin Tissoires <benjamin.tissoires@redhat.com>2014-07-24 22:16:17 +0200
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2014-07-26 03:55:52 +0200
commitc757cbafd6afe8e47d12320aa05edcd1b1d97186 (patch)
treeee5f29d13f2d0d4c9a2c787c3af446e1dbc2902d /drivers/hid/wacom.h
parentInput: wacom - support up to 2048 pressure levels with ISDv4 (diff)
downloadlinux-c757cbafd6afe8e47d12320aa05edcd1b1d97186.tar.xz
linux-c757cbafd6afe8e47d12320aa05edcd1b1d97186.zip
Input: wacom - put a flag when the led are initialized
This solves a bug with the wireless receiver: - at plug, the wireless receiver does not know which Wacom device it is connected to, so it does not actually creates all the LEDs - when the tablet connects, wacom->wacom_wac.features.type is set to the proper device so that wacom_wac can understand the packets - when the receiver is unplugged, it detects that a LED should have been created (based on wacom->wacom_wac.features.type) and tries to remove it: crash when removing the sysfs group. Side effect, we can now safely call several times wacom_destroy_leds(). Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Acked-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/hid/wacom.h')
-rw-r--r--drivers/hid/wacom.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/hid/wacom.h b/drivers/hid/wacom.h
index dd67b7da8a97..a678f827e39e 100644
--- a/drivers/hid/wacom.h
+++ b/drivers/hid/wacom.h
@@ -118,6 +118,7 @@ struct wacom {
u8 hlv; /* status led brightness button pressed (1..127) */
u8 img_lum; /* OLED matrix display brightness */
} led;
+ bool led_initialized;
struct power_supply battery;
};