diff options
Diffstat (limited to 'drivers/input/tablet/wacom_wac.c')
-rw-r--r-- | drivers/input/tablet/wacom_wac.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/input/tablet/wacom_wac.c b/drivers/input/tablet/wacom_wac.c index fce7a09fb5db..99fb6fed2bf3 100644 --- a/drivers/input/tablet/wacom_wac.c +++ b/drivers/input/tablet/wacom_wac.c @@ -1054,17 +1054,20 @@ static int wacom_wireless_irq(struct wacom_wac *wacom, size_t len) connected = data[1] & 0x01; if (connected) { - int pid; + int pid, battery; pid = get_unaligned_be16(&data[6]); + battery = data[5] & 0x3f; if (wacom->pid != pid) { wacom->pid = pid; wacom_schedule_work(wacom); } + wacom->battery_capacity = battery; } else if (wacom->pid != 0) { /* disconnected while previously connected */ wacom->pid = 0; wacom_schedule_work(wacom); + wacom->battery_capacity = 0; } return 0; |