From: Geert Uytterhoeven Date: Mon, 26 Mar 2012 06:29:30 +0000 (-0700) Subject: Input: amijoy - add missing platform check X-Git-Tag: v3.4-rc1~28^2~1^2~1 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=3183968cbfb76c02f357151f66a1260101f9d82c;p=~emulex%2Finfiniband.git 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 Signed-off-by: Dmitry Torokhov --- diff --git a/drivers/input/joystick/amijoy.c b/drivers/input/joystick/amijoy.c index 0bc86204213..3aa93bf60ae 100644 --- a/drivers/input/joystick/amijoy.c +++ b/drivers/input/joystick/amijoy.c @@ -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;