diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2021-02-21 13:16:08 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2021-02-21 13:16:08 -0800 |
commit | b811b41024afa1271afc5af84f663515d9227554 (patch) | |
tree | 6544bc897e9b2d73bd2c58ba9efa72bb11cb20f3 /drivers | |
parent | 99ca0edb41aabd888ca1548fa0391a4975740a83 (diff) | |
parent | c396dd2ec5bbd1cb80eafe32a72ab6bd6b17cb5a (diff) | |
download | linux-b811b41024afa1271afc5af84f663515d9227554.tar.bz2 |
Merge tag 'm68k-for-v5.12-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k
Pull m68k updates from Geert Uytterhoeven:
- fix ADB autopoll regression
- defconfig updates
* tag 'm68k-for-v5.12-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k:
macintosh/adb-iop: Use big-endian autopoll mask
m68k: defconfig: Update defconfigs for v5.11-rc1
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/macintosh/adb-iop.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/macintosh/adb-iop.c b/drivers/macintosh/adb-iop.c index 0ee327249150..2633bc254935 100644 --- a/drivers/macintosh/adb-iop.c +++ b/drivers/macintosh/adb-iop.c @@ -19,6 +19,7 @@ #include <asm/macints.h> #include <asm/mac_iop.h> #include <asm/adb_iop.h> +#include <asm/unaligned.h> #include <linux/adb.h> @@ -249,7 +250,7 @@ static void adb_iop_set_ap_complete(struct iop_msg *msg) { struct adb_iopmsg *amsg = (struct adb_iopmsg *)msg->message; - autopoll_devs = (amsg->data[1] << 8) | amsg->data[0]; + autopoll_devs = get_unaligned_be16(amsg->data); if (autopoll_devs & (1 << autopoll_addr)) return; autopoll_addr = autopoll_devs ? (ffs(autopoll_devs) - 1) : 0; @@ -266,8 +267,7 @@ static int adb_iop_autopoll(int devs) amsg.flags = ADB_IOP_SET_AUTOPOLL | (mask ? ADB_IOP_AUTOPOLL : 0); amsg.count = 2; amsg.cmd = 0; - amsg.data[0] = mask & 0xFF; - amsg.data[1] = (mask >> 8) & 0xFF; + put_unaligned_be16(mask, amsg.data); iop_send_message(ADB_IOP, ADB_CHAN, NULL, sizeof(amsg), (__u8 *)&amsg, adb_iop_set_ap_complete); |