Commit 6130ed79 authored by Yang Guang's avatar Yang Guang Committed by Michael Ellerman
Browse files

macintosh/adb: Use swap() to make code cleaner



Use the macro 'swap()' defined in 'include/linux/minmax.h' to avoid
opencoding it.

Reported-by: default avatarZeal Robot <zealci@zte.com.cn>
Signed-off-by: default avatarYang Guang <yang.guang5@zte.com.cn>
Signed-off-by: default avatarChristophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20211104011456.1027830-1-yang.guang5@zte.com.cn
parent 887f56a0
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -816,9 +816,7 @@ adbhid_input_register(int id, int default_id, int original_handler_id,
		case 0xC4: case 0xC7:
			keyboard_type = "ISO, swapping keys";
			input_dev->id.version = ADB_KEYBOARD_ISO;
			i = hid->keycode[10];
			hid->keycode[10] = hid->keycode[50];
			hid->keycode[50] = i;
			swap(hid->keycode[10], hid->keycode[50]);
			break;

		case 0x12: case 0x15: case 0x16: case 0x17: case 0x1A: