Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Input: amijoy - add missing platform check

On multi-platform kernels, the Amiga joystick driver may be initialized
when running on Amiga only. Else it may crash later.
Fortunately this driver is almost always compiled as a module (to avoid
conflicts with the mouse driver), so it needs an explicit insmod to
trigger a crash.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>

authored by

Geert Uytterhoeven and committed by
Dmitry Torokhov
3183968c a1d552cc

+3
+3
drivers/input/joystick/amijoy.c
··· 108 108 int i, j; 109 109 int err; 110 110 111 + if (!MACH_IS_AMIGA) 112 + return -ENODEV; 113 + 111 114 for (i = 0; i < 2; i++) { 112 115 if (!amijoy[i]) 113 116 continue;