diff options
author | Geert Uytterhoeven <geert@linux-m68k.org> | 2012-03-26 10:29:30 +0400 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2012-03-26 10:33:23 +0400 |
commit | 3183968cbfb76c02f357151f66a1260101f9d82c (patch) | |
tree | 50cae67a14affffab978d321cae4d6e79b550006 /drivers/input/joystick | |
parent | a1d552cc15b0be9124ccba593f99f59c4ec1e153 (diff) | |
download | linux-3183968cbfb76c02f357151f66a1260101f9d82c.tar.xz |
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>
Diffstat (limited to 'drivers/input/joystick')
-rw-r--r-- | drivers/input/joystick/amijoy.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/input/joystick/amijoy.c b/drivers/input/joystick/amijoy.c index 0bc86204213e..3aa93bf60ae3 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; |