mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
HID: logitech-hidpp: make sure we only register one battery per device
Simple check to add, huge improvement :) Signed-off-by: Benjamin Tissoires <[email protected]> Tested-by: Bastien Nocera <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
This commit is contained in:
parent
3861e6ca30
commit
680de741e8
1 changed files with 3 additions and 0 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue