Commit c061046
HID: apple: avoid setting up battery timer for devices without battery
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]>1 parent 8a20830 commit c061046
1 file changed
+11
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
933 | 933 | | |
934 | 934 | | |
935 | 935 | | |
936 | | - | |
937 | | - | |
938 | | - | |
939 | | - | |
| 936 | + | |
| 937 | + | |
| 938 | + | |
| 939 | + | |
| 940 | + | |
| 941 | + | |
940 | 942 | | |
941 | 943 | | |
942 | 944 | | |
| |||
950 | 952 | | |
951 | 953 | | |
952 | 954 | | |
953 | | - | |
| 955 | + | |
| 956 | + | |
| 957 | + | |
954 | 958 | | |
955 | 959 | | |
956 | 960 | | |
| |||
959 | 963 | | |
960 | 964 | | |
961 | 965 | | |
962 | | - | |
| 966 | + | |
| 967 | + | |
963 | 968 | | |
964 | 969 | | |
965 | 970 | | |
| |||
0 commit comments