Commit 7614f94
HID: apple: avoid setting up battery timer for devices without battery
commit c061046 upstream.
Currently, the battery timer is set up for all devices using hid-apple,
irrespective of whether they actually have a battery or not.
APPLE_RDESC_BATTERY is a quirk that indicates the device has a battery
and needs the battery timer. This patch checks for this quirk before
setting up the timer, ensuring that only devices with a battery will
have the timer set up.
Fixes: 6e14329 ("HID: apple: Report Magic Keyboard battery over USB")
Cc: [email protected]
Signed-off-by: Aditya Garg <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>1 parent 85b10c0 commit 7614f94
1 file changed
Lines changed: 11 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
934 | 934 | | |
935 | 935 | | |
936 | 936 | | |
937 | | - | |
938 | | - | |
939 | | - | |
940 | | - | |
| 937 | + | |
| 938 | + | |
| 939 | + | |
| 940 | + | |
| 941 | + | |
| 942 | + | |
941 | 943 | | |
942 | 944 | | |
943 | 945 | | |
| |||
951 | 953 | | |
952 | 954 | | |
953 | 955 | | |
954 | | - | |
| 956 | + | |
| 957 | + | |
| 958 | + | |
955 | 959 | | |
956 | 960 | | |
957 | 961 | | |
| |||
960 | 964 | | |
961 | 965 | | |
962 | 966 | | |
963 | | - | |
| 967 | + | |
| 968 | + | |
964 | 969 | | |
965 | 970 | | |
966 | 971 | | |
| |||
0 commit comments