diff options
author | Benjamin Tissoires <benjamin.tissoires@redhat.com> | 2016-07-13 19:05:48 +0300 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2016-08-05 14:39:11 +0300 |
commit | d453b87612a0aba6ca6ec85447eeefa220cadec5 (patch) | |
tree | 4b081c6d14aec947d7d4e79648b8750cbe3ea737 /drivers | |
parent | 884316deb4c9fdf9becfa31831a9e40717e3026c (diff) | |
download | linux-d453b87612a0aba6ca6ec85447eeefa220cadec5.tar.xz |
HID: wacom: actually report the battery level for wireless connected
Since fd5f92b ("HID: wacom: reuse wacom_parse_and_register() in
wireless_work"), wacom->shared->type is not set.
Send the information of the battery if we have one.
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Acked-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/hid/wacom_wac.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/hid/wacom_wac.c b/drivers/hid/wacom_wac.c index 1eae13cdc502..d6746caf71cb 100644 --- a/drivers/hid/wacom_wac.c +++ b/drivers/hid/wacom_wac.c @@ -2125,6 +2125,7 @@ static int wacom_bamboo_pad_irq(struct wacom_wac *wacom, size_t len) static int wacom_wireless_irq(struct wacom_wac *wacom, size_t len) { + struct wacom *w = container_of(wacom, struct wacom, wacom_wac); unsigned char *data = wacom->data; int connected; @@ -2152,7 +2153,7 @@ static int wacom_wireless_irq(struct wacom_wac *wacom, size_t len) wacom_schedule_work(wacom); } - if (wacom->shared->type) + if (w->battery) wacom_notify_battery(wacom, battery, charging, 1, 0); } else if (wacom->pid != 0) { |