Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1442571 > unrolled thread

[PATCH v2 01/30] HID: wacom: actually report the battery level for wireless connected

Started byBenjamin Tissoires <benjamin.tissoires@redhat.com>
First post2016-07-13 18:10 +0200
Last post2016-07-13 18:10 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH v2 01/30] HID: wacom: actually report the battery level for wireless connected Benjamin Tissoires <benjamin.tissoires@redhat.com> - 2016-07-13 18:10 +0200

#1442571 — [PATCH v2 01/30] HID: wacom: actually report the battery level for wireless connected

FromBenjamin Tissoires <benjamin.tissoires@redhat.com>
Date2016-07-13 18:10 +0200
Subject[PATCH v2 01/30] HID: wacom: actually report the battery level for wireless connected
Message-ID<rUuTw-5nh-5@gated-at.bofh.it>
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>
---

No changes in v2
---
 drivers/hid/wacom_wac.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/hid/wacom_wac.c b/drivers/hid/wacom_wac.c
index 1eae13c..d6746ca 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) {
-- 
2.5.5

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web