projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3861e6c
)
HID: logitech-hidpp: make sure we only register one battery per device
author
Benjamin Tissoires
<benjamin.tissoires@redhat.com>
Mon, 27 Mar 2017 14:59:23 +0000
(16:59 +0200)
committer
Jiri Kosina
<jkosina@suse.cz>
Thu, 6 Apr 2017 12:36:36 +0000
(14:36 +0200)
Simple check to add, huge improvement :)
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Tested-by: Bastien Nocera <hadess@hadess.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-logitech-hidpp.c
patch
|
blob
|
history
diff --git
a/drivers/hid/hid-logitech-hidpp.c
b/drivers/hid/hid-logitech-hidpp.c
index 4aaf2378897f21759615898549e9e04d8eb287da..1cda29ec0efdfb2f6c50a280acd5b9b288318f8b 100644
(file)
--- a/
drivers/hid/hid-logitech-hidpp.c
+++ b/
drivers/hid/hid-logitech-hidpp.c
@@
-828,6
+828,9
@@
static int hidpp_initialize_battery(struct hidpp_device *hidpp)
{
int ret;
+ if (hidpp->battery.ps)
+ return 0;
+
if (hidpp->protocol_major >= 2) {
ret = hidpp20_initialize_battery(hidpp);
if (ret == 0)