linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 08/11] input/amijoy: Add missing platform check
       [not found] <1332323515-7314-1-git-send-email-geert@linux-m68k.org>
@ 2012-03-21  9:51 ` Geert Uytterhoeven
  2012-03-26  6:29   ` Dmitry Torokhov
  0 siblings, 1 reply; 2+ messages in thread
From: Geert Uytterhoeven @ 2012-03-21  9:51 UTC (permalink / raw)
  To: linux-m68k; +Cc: linux-kernel, Geert Uytterhoeven, Dmitry Torokhov, linux-input

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>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: linux-input@vger.kernel.org
---
 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 0bc8620..3aa93bf 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;
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 08/11] input/amijoy: Add missing platform check
  2012-03-21  9:51 ` [PATCH 08/11] input/amijoy: Add missing platform check Geert Uytterhoeven
@ 2012-03-26  6:29   ` Dmitry Torokhov
  0 siblings, 0 replies; 2+ messages in thread
From: Dmitry Torokhov @ 2012-03-26  6:29 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: linux-m68k, linux-kernel, linux-input

On Wed, Mar 21, 2012 at 10:51:52AM +0100, Geert Uytterhoeven wrote:
> 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>
> Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> Cc: linux-input@vger.kernel.org

Applied, thanks Geert.

> ---
>  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 0bc8620..3aa93bf 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;
> -- 
> 1.7.0.4
> 

-- 
Dmitry

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-03-26  6:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1332323515-7314-1-git-send-email-geert@linux-m68k.org>
2012-03-21  9:51 ` [PATCH 08/11] input/amijoy: Add missing platform check Geert Uytterhoeven
2012-03-26  6:29   ` Dmitry Torokhov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).