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>
This commit is contained in:
Geert Uytterhoeven 2012-03-25 23:29:30 -07:00 committed by Dmitry Torokhov
parent a1d552cc15
commit 3183968cbf

View File

@ -108,6 +108,9 @@ static int __init amijoy_init(void)
int i, j;
int err;
if (!MACH_IS_AMIGA)
return -ENODEV;
for (i = 0; i < 2; i++) {
if (!amijoy[i])
continue;