summaryrefslogtreecommitdiff
path: root/drivers/hid
diff options
context:
space:
mode:
authorMichael Bestas <mkbestas@lineageos.org>2021-10-18 18:22:55 +0300
committerMichael Bestas <mkbestas@lineageos.org>2021-10-18 18:22:55 +0300
commit0e3b56cdb412e1bc868db2e7649fb6978269e196 (patch)
tree8c7a562e32c15349815e6720076a12922f0d89dd /drivers/hid
parentdea2d7ed9189653c985767477470773f6735be69 (diff)
parentbf687da3fdbe378ae33b7d4c6cbaa2dfa3993628 (diff)
Merge remote-tracking branch 'common/android-4.4-p' into lineage-18.1-caf-msm8998
# By Eric Dumazet (2) and others # Via Greg Kroah-Hartman * common/android-4.4-p: Linux 4.4.289 perf/x86: Reset destroy callback on event init failure scsi: virtio_scsi: Fix spelling mistake "Unsupport" -> "Unsupported" scsi: ses: Fix unsigned comparison with less than zero mac80211: Drop frames from invalid MAC address in ad-hoc mode netfilter: ip6_tables: zero-initialize fragment offset HID: apple: Fix logical maximum and usage maximum of Magic Keyboard JIS mm: check VMA flags to avoid invalid PROT_NONE NUMA balancing gup: document and work around "COW can break either way" issue i40e: fix endless loop under rtnl netlink: annotate data races around nlk->bound ARM: imx6: disable the GIC CPU interface before calling stby-poweroff sequence ptp_pch: Load module automatically if ID matches net_sched: fix NULL deref in fifo_set_limit() phy: mdio: fix memory leak xtensa: call irqchip_init only when CONFIG_USE_OF is selected nfsd4: Handle the NFSv4 READDIR 'dircount' hint being zero USB: cdc-acm: fix break reporting USB: cdc-acm: fix racy tty buffer accesses Change-Id: I72428b366b3ed4931d8f8e8b38c7842ed48ead22
Diffstat (limited to 'drivers/hid')
-rw-r--r--drivers/hid/hid-apple.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/hid/hid-apple.c b/drivers/hid/hid-apple.c
index ec4250061922..8ced12c57cce 100644
--- a/drivers/hid/hid-apple.c
+++ b/drivers/hid/hid-apple.c
@@ -301,12 +301,19 @@ static int apple_event(struct hid_device *hdev, struct hid_field *field,
/*
* MacBook JIS keyboard has wrong logical maximum
+ * Magic Keyboard JIS has wrong logical maximum
*/
static __u8 *apple_report_fixup(struct hid_device *hdev, __u8 *rdesc,
unsigned int *rsize)
{
struct apple_sc *asc = hid_get_drvdata(hdev);
+ if(*rsize >=71 && rdesc[70] == 0x65 && rdesc[64] == 0x65) {
+ hid_info(hdev,
+ "fixing up Magic Keyboard JIS report descriptor\n");
+ rdesc[64] = rdesc[70] = 0xe7;
+ }
+
if ((asc->quirks & APPLE_RDESC_JIS) && *rsize >= 60 &&
rdesc[53] == 0x65 && rdesc[59] == 0x65) {
hid_info(hdev,