Commit 3183968c authored by Geert Uytterhoeven's avatar Geert Uytterhoeven Committed by Dmitry Torokhov

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: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: default avatarDmitry Torokhov <dtor@mail.ru>
parent a1d552cc
...@@ -108,6 +108,9 @@ static int __init amijoy_init(void) ...@@ -108,6 +108,9 @@ static int __init amijoy_init(void)
int i, j; int i, j;
int err; int err;
if (!MACH_IS_AMIGA)
return -ENODEV;
for (i = 0; i < 2; i++) { for (i = 0; i < 2; i++) {
if (!amijoy[i]) if (!amijoy[i])
continue; continue;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment