[PATCH 1/2] input: fix ps2/serio module dependency

Subsystems: input (keyboard, mouse, joystick, touchscreen) drivers, the rest

STALE4457d

3 messages, 2 authors, 2014-05-09 · open the first message on its own page

[PATCH 1/2] input: fix ps2/serio module dependency

From: Arnd Bergmann <arnd@arndb.de>
Date: 2014-05-08 14:57:09

The ps2 mouse and keyboard drivers use the "serio" framework that
they correctly select in Kconfig, and that in turn depends on the
i8042 driver, which is also allowed to be disabled for architectures
that don't have an i8042.

However, Kconfig also allows i8042 to be built as a module while
the serio framework is built-in, which causes this link error:

drivers/built-in.o: In function `ps2_begin_command':
:(.text+0x26b6cc): undefined reference to `i8042_check_port_owner'
:(.text+0x26b6d4): undefined reference to `i8042_lock_chip'
drivers/built-in.o: In function `ps2_end_command':
:(.text+0x26b734): undefined reference to `i8042_check_port_owner'
:(.text+0x26b73c): undefined reference to `i8042_unlock_chip'

On x86, a specific 'select SERIO_I8042' takes care of it, but
not on the other architecture that potentially have a u8042.

This patch changes the Kconfig logic to ensure that whenever
there is an i8042, it does get used for the serio driver, avoiding
the link error above.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: linux-input@vger.kernel.org
---
 drivers/input/keyboard/Kconfig | 2 +-
 drivers/input/mouse/Kconfig    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/input/keyboard/Kconfig b/drivers/input/keyboard/Kconfig
index 4f115db..dd2435a 100644
--- a/drivers/input/keyboard/Kconfig
+++ b/drivers/input/keyboard/Kconfig
@@ -71,7 +71,7 @@ config KEYBOARD_ATKBD
 	default y
 	select SERIO
 	select SERIO_LIBPS2
-	select SERIO_I8042 if X86
+	select SERIO_I8042 if X86 || ARCH_MIGHT_HAVE_PC_SERIO
 	select SERIO_GSCPS2 if GSC
 	help
 	  Say Y here if you want to use a standard AT or PS/2 keyboard. Usually
diff --git a/drivers/input/mouse/Kconfig b/drivers/input/mouse/Kconfig
index effa9c5..cf534ee 100644
--- a/drivers/input/mouse/Kconfig
+++ b/drivers/input/mouse/Kconfig
@@ -17,7 +17,7 @@ config MOUSE_PS2
 	default y
 	select SERIO
 	select SERIO_LIBPS2
-	select SERIO_I8042 if X86
+	select SERIO_I8042 if X86 || ARCH_MIGHT_HAVE_PC_SERIO
 	select SERIO_GSCPS2 if GSC
 	help
 	  Say Y here if you have a PS/2 mouse connected to your system. This
-- 
1.8.3.2

Re: [PATCH 1/2] input: fix ps2/serio module dependency

From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Date: 2014-05-08 15:59:38

Hi Arnd,

On Thu, May 08, 2014 at 04:56:26PM +0200, Arnd Bergmann wrote:
quoted hunk
@@ -71,7 +71,7 @@ config KEYBOARD_ATKBD
 	default y
 	select SERIO
 	select SERIO_LIBPS2
-	select SERIO_I8042 if X86
+	select SERIO_I8042 if X86 || ARCH_MIGHT_HAVE_PC_SERIO
x86 also selects ARCH_MIGHT_HAVE_PC_SERIO so shouldn't this be

	select SERIO_I8042 if ARCH_MIGHT_HAVE_PC_SERIO

?

I can fix it up on my side if you agree.

Thanks.

-- 
Dmitry

Re: [PATCH 1/2] input: fix ps2/serio module dependency

From: Arnd Bergmann <arnd@arndb.de>
Date: 2014-05-09 07:34:31

On Thursday 08 May 2014 08:59:31 Dmitry Torokhov wrote:
Hi Arnd,

On Thu, May 08, 2014 at 04:56:26PM +0200, Arnd Bergmann wrote:
quoted
@@ -71,7 +71,7 @@ config KEYBOARD_ATKBD
      default y
      select SERIO
      select SERIO_LIBPS2
-     select SERIO_I8042 if X86
+     select SERIO_I8042 if X86 || ARCH_MIGHT_HAVE_PC_SERIO
x86 also selects ARCH_MIGHT_HAVE_PC_SERIO so shouldn't this be

        select SERIO_I8042 if ARCH_MIGHT_HAVE_PC_SERIO

?

I can fix it up on my side if you agree.
Yes, sounds good, thanks!

	Arnd
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help