diff mbox

[14/21] staging: nvec: allow modular build

Message ID 1366734653-488286-15-git-send-email-arnd@arndb.de (mailing list archive)
State New, archived
Headers show

Commit Message

Arnd Bergmann April 23, 2013, 4:30 p.m. UTC
The serio code can be a loadable module, which in turn means that nvec
also has to be a module, so mark it as "tristate" in Kconfig.

drivers/built-in.o: In function `nvec_mouse_remove':
drivers/staging/nvec/nvec_ps2.c:136: undefined reference to `serio_unregister_port'
drivers/built-in.o: In function `nvec_mouse_probe':
drivers/staging/nvec/nvec_ps2.c:126: undefined reference to `__serio_register_port'
drivers/built-in.o: In function `nvec_ps2_notifier':
drivers/staging/nvec/nvec_ps2.c:84: undefined reference to `serio_interrupt'
drivers/staging/nvec/nvec_ps2.c:91: undefined reference to `serio_interrupt'

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Marc Dietrich <marvin24@gmx.de>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/staging/nvec/Kconfig | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

Comments

Marc Dietrich April 23, 2013, 7:21 p.m. UTC | #1
Arnd,

On Tuesday 23 April 2013 18:30:46 Arnd Bergmann wrote:
> The serio code can be a loadable module, which in turn means that nvec
> also has to be a module, so mark it as "tristate" in Kconfig.

oh, I didn't saw this randconfig error posting. NVEC isn't prepared for 
modularized builds yet (it's on the TODO list though). So better say SERIO=y 
here. Looking a bit closer, there is other stuff which can also be a module 
(GPIOLIB, I2C, ...) so these also need a =y.

Should a post a patch?

Marc
 
> drivers/built-in.o: In function `nvec_mouse_remove':
> drivers/staging/nvec/nvec_ps2.c:136: undefined reference to
> `serio_unregister_port' drivers/built-in.o: In function `nvec_mouse_probe':
> drivers/staging/nvec/nvec_ps2.c:126: undefined reference to
> `__serio_register_port' drivers/built-in.o: In function
> `nvec_ps2_notifier':
> drivers/staging/nvec/nvec_ps2.c:84: undefined reference to `serio_interrupt'
> drivers/staging/nvec/nvec_ps2.c:91: undefined reference to
> `serio_interrupt'
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Cc: Marc Dietrich <marvin24@gmx.de>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> ---
>  drivers/staging/nvec/Kconfig | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/staging/nvec/Kconfig b/drivers/staging/nvec/Kconfig
> index f779fdc..7e61ada 100644
> --- a/drivers/staging/nvec/Kconfig
> +++ b/drivers/staging/nvec/Kconfig
> @@ -1,5 +1,5 @@
>  config MFD_NVEC
> -	bool "NV Tegra Embedded Controller SMBus Interface"
> +	tristate "NV Tegra Embedded Controller SMBus Interface"
>  	depends on I2C && GPIOLIB && ARCH_TEGRA
>  	select MFD_CORE
>  	help
> @@ -7,28 +7,28 @@ config MFD_NVEC
>  	    controller.
> 
>  config KEYBOARD_NVEC
> -	bool "Keyboard on nVidia compliant EC"
> +	tristate "Keyboard on nVidia compliant EC"
>  	depends on MFD_NVEC && INPUT
>  	help
>  	  Say Y here to enable support for a keyboard connected to
>  	  a nVidia compliant embedded controller.
> 
>  config SERIO_NVEC_PS2
> -	bool "PS2 on nVidia EC"
> +	tristate "PS2 on nVidia EC"
>  	depends on MFD_NVEC && SERIO
>  	help
>  	  Say Y here to enable support for a Touchpad / Mouse connected
>  	  to a nVidia compliant embedded controller.
> 
>  config NVEC_POWER
> -	bool "NVEC charger and battery"
> +	tristate "NVEC charger and battery"
>  	depends on MFD_NVEC && POWER_SUPPLY
>  	help
>  	  Say Y to enable support for battery and charger interface for
>  	  nVidia compliant embedded controllers.
> 
>  config NVEC_PAZ00
> -	bool "Support for OEM specific functions on Compal PAZ00 based devices"
> +	tristate "Support for OEM specific functions on Compal PAZ00 based
> devices" depends on MFD_NVEC && LEDS_CLASS
>  	help
>  	  Say Y to enable control of the yellow side leds on Compal PAZ00 based
Arnd Bergmann April 23, 2013, 7:41 p.m. UTC | #2
On Tuesday 23 April 2013, Marc Dietrich wrote:
> On Tuesday 23 April 2013 18:30:46 Arnd Bergmann wrote:
> > The serio code can be a loadable module, which in turn means that nvec
> > also has to be a module, so mark it as "tristate" in Kconfig.
> 
> oh, I didn't saw this randconfig error posting. NVEC isn't prepared for 
> modularized builds yet (it's on the TODO list though). So better say SERIO=y 
> here. Looking a bit closer, there is other stuff which can also be a module 
> (GPIOLIB, I2C, ...) so these also need a =y.

What is the problem with building it as a module? It looks all fine in that
regard.

I also did not see any problems with the other symbols, but that may be
because they get turned on as built-in even in allmodconfig. Marking it
as tristate certainly avoids the problem altogether.

> Should a post a patch?

If you have follow-on patches, they need to go on top now, since Greg
already took this patch.

	Arnd
Marc Dietrich April 23, 2013, 7:55 p.m. UTC | #3
On Tuesday 23 April 2013 21:41:03 Arnd Bergmann wrote:
> On Tuesday 23 April 2013, Marc Dietrich wrote:
> > On Tuesday 23 April 2013 18:30:46 Arnd Bergmann wrote:
> > > The serio code can be a loadable module, which in turn means that nvec
> > > also has to be a module, so mark it as "tristate" in Kconfig.
> > 
> > oh, I didn't saw this randconfig error posting. NVEC isn't prepared for
> > modularized builds yet (it's on the TODO list though). So better say
> > SERIO=y here. Looking a bit closer, there is other stuff which can also
> > be a module (GPIOLIB, I2C, ...) so these also need a =y.
> 
> What is the problem with building it as a module? It looks all fine in that
> regard.

It builds, but I haven't tried out it yet. At least the mfd children need to 
unregister the event notifier I guess. Anyway, I have no time to test this 
now, so I prefer to force =y for the dependencies for now.

> I also did not see any problems with the other symbols, but that may be
> because they get turned on as built-in even in allmodconfig. Marking it
> as tristate certainly avoids the problem altogether.
> 
> > Should a post a patch?
> 
> If you have follow-on patches, they need to go on top now, since Greg
> already took this patch.

arrr, I wonder why Greg thought that a 4 minute review time is enough :-(
I'll try to post a patch tomorrow then.

Marc
Greg KH April 23, 2013, 8:05 p.m. UTC | #4
On Tue, Apr 23, 2013 at 09:55:48PM +0200, Marc Dietrich wrote:
> On Tuesday 23 April 2013 21:41:03 Arnd Bergmann wrote:
> > On Tuesday 23 April 2013, Marc Dietrich wrote:
> > > On Tuesday 23 April 2013 18:30:46 Arnd Bergmann wrote:
> > > > The serio code can be a loadable module, which in turn means that nvec
> > > > also has to be a module, so mark it as "tristate" in Kconfig.
> > > 
> > > oh, I didn't saw this randconfig error posting. NVEC isn't prepared for
> > > modularized builds yet (it's on the TODO list though). So better say
> > > SERIO=y here. Looking a bit closer, there is other stuff which can also
> > > be a module (GPIOLIB, I2C, ...) so these also need a =y.
> > 
> > What is the problem with building it as a module? It looks all fine in that
> > regard.
> 
> It builds, but I haven't tried out it yet. At least the mfd children need to 
> unregister the event notifier I guess. Anyway, I have no time to test this 
> now, so I prefer to force =y for the dependencies for now.
> 
> > I also did not see any problems with the other symbols, but that may be
> > because they get turned on as built-in even in allmodconfig. Marking it
> > as tristate certainly avoids the problem altogether.
> > 
> > > Should a post a patch?
> > 
> > If you have follow-on patches, they need to go on top now, since Greg
> > already took this patch.
> 
> arrr, I wonder why Greg thought that a 4 minute review time is enough :-(

It was longer than 4 minutes...

I trust Arnd, and it's only a staging driver, what's the worse thing
that could happen to it?  :)

> I'll try to post a patch tomorrow then.

That would be great.

thanks,

greg k-h
Arnd Bergmann April 23, 2013, 8:14 p.m. UTC | #5
On Tuesday 23 April 2013, Marc Dietrich wrote:
> It builds, but I haven't tried out it yet. At least the mfd children need to 
> unregister the event notifier I guess. Anyway, I have no time to test this 
> now, so I prefer to force =y for the dependencies for now.

Ah, so you can load it fine, but not safely unload it? In that case I think
it's better to leave it as tristate but remove the module_exit() function to
prevent unloading.

You'll have to change the module_platform_driver() back into a manual
module_init() function to register the driver, but that sounds like
the cleanest solution aside from fixing the notifier calls.

	Arnd
Marc Dietrich April 23, 2013, 8:21 p.m. UTC | #6
On Tuesday 23 April 2013 22:14:18 Arnd Bergmann wrote:
> On Tuesday 23 April 2013, Marc Dietrich wrote:
> > It builds, but I haven't tried out it yet. At least the mfd children need
> > to unregister the event notifier I guess. Anyway, I have no time to test
> > this now, so I prefer to force =y for the dependencies for now.
> 
> Ah, so you can load it fine, but not safely unload it? In that case I think
> it's better to leave it as tristate but remove the module_exit() function to
> prevent unloading.
> 
> You'll have to change the module_platform_driver() back into a manual
> module_init() function to register the driver, but that sounds like
> the cleanest solution aside from fixing the notifier calls.

ok, I'll look into it - maybe I can also fix unloading.

Thanks!

Marc
diff mbox

Patch

diff --git a/drivers/staging/nvec/Kconfig b/drivers/staging/nvec/Kconfig
index f779fdc..7e61ada 100644
--- a/drivers/staging/nvec/Kconfig
+++ b/drivers/staging/nvec/Kconfig
@@ -1,5 +1,5 @@ 
 config MFD_NVEC
-	bool "NV Tegra Embedded Controller SMBus Interface"
+	tristate "NV Tegra Embedded Controller SMBus Interface"
 	depends on I2C && GPIOLIB && ARCH_TEGRA
 	select MFD_CORE
 	help
@@ -7,28 +7,28 @@  config MFD_NVEC
 	    controller.
 
 config KEYBOARD_NVEC
-	bool "Keyboard on nVidia compliant EC"
+	tristate "Keyboard on nVidia compliant EC"
 	depends on MFD_NVEC && INPUT
 	help
 	  Say Y here to enable support for a keyboard connected to 
 	  a nVidia compliant embedded controller.
 
 config SERIO_NVEC_PS2
-	bool "PS2 on nVidia EC"
+	tristate "PS2 on nVidia EC"
 	depends on MFD_NVEC && SERIO
 	help
 	  Say Y here to enable support for a Touchpad / Mouse connected
 	  to a nVidia compliant embedded controller.
 
 config NVEC_POWER
-	bool "NVEC charger and battery"
+	tristate "NVEC charger and battery"
 	depends on MFD_NVEC && POWER_SUPPLY
 	help
 	  Say Y to enable support for battery and charger interface for
 	  nVidia compliant embedded controllers.
 
 config NVEC_PAZ00
-	bool "Support for OEM specific functions on Compal PAZ00 based devices"
+	tristate "Support for OEM specific functions on Compal PAZ00 based devices"
 	depends on MFD_NVEC && LEDS_CLASS
 	help
 	  Say Y to enable control of the yellow side leds on Compal PAZ00 based