mirror of
https://github.com/torvalds/linux.git
synced 2024-12-15 07:33:56 +00:00
HID: logitech-hidpp: make sure we only register one battery per device
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>
This commit is contained in:
parent
3861e6ca30
commit
680de741e8
@ -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 New Issue
Block a user