* [PATCH -next] iwlwifi: fix build for CONFIG_INPUT=n
@ 2008-06-25 4:02 Randy Dunlap
2008-06-26 2:13 ` Zhu Yi
0 siblings, 1 reply; 3+ messages in thread
From: Randy Dunlap @ 2008-06-25 4:02 UTC (permalink / raw)
To: linux-wireless, yi.zhu; +Cc: linux-next, akpm, linville
From: Randy Dunlap <randy.dunlap@oracle•com>
Fix iwlwifi so that it builds cleanly with CONFIG_INPUT=n.
Also free the input device on exit.
drivers/built-in.o: In function `iwl_rfkill_unregister':
(.text+0xbf430): undefined reference to `input_unregister_device'
drivers/built-in.o: In function `iwl_rfkill_init':
(.text+0xbf51c): undefined reference to `input_allocate_device'
drivers/built-in.o: In function `iwl_rfkill_init':
(.text+0xbf5bf): undefined reference to `input_register_device'
drivers/built-in.o: In function `iwl_rfkill_init':
(.text+0xbf5e9): undefined reference to `input_free_device'
net/built-in.o: In function `rfkill_disconnect':
rfkill-input.c:(.text+0xe71e1): undefined reference to `input_close_device'
rfkill-input.c:(.text+0xe71e9): undefined reference to `input_unregister_handle'
net/built-in.o: In function `rfkill_connect':
rfkill-input.c:(.text+0xe723e): undefined reference to `input_register_handle'
rfkill-input.c:(.text+0xe724d): undefined reference to `input_open_device'
rfkill-input.c:(.text+0xe725c): undefined reference to `input_unregister_handle'
net/built-in.o: In function `rfkill_handler_init':
rfkill-input.c:(.init.text+0x36ec): undefined reference to `input_register_handler'
net/built-in.o: In function `rfkill_handler_exit':
rfkill-input.c:(.exit.text+0x112c): undefined reference to `input_unregister_handler'
make[1]: *** [.tmp_vmlinux1] Error 1
Signed-off-by: Randy Dunlap <randy.dunlap@oracle•com>
---
drivers/net/wireless/iwlwifi/Kconfig | 2 +-
drivers/net/wireless/iwlwifi/iwl-rfkill.c | 11 ++++++++++-
2 files changed, 11 insertions(+), 2 deletions(-)
--- linux-next-20080624.orig/drivers/net/wireless/iwlwifi/Kconfig
+++ linux-next-20080624/drivers/net/wireless/iwlwifi/Kconfig
@@ -8,7 +8,7 @@ config IWLCORE
select MAC80211_LEDS if IWLWIFI_LEDS
select LEDS_CLASS if IWLWIFI_LEDS
select RFKILL if IWLWIFI_RFKILL
- select RFKILL_INPUT if IWLWIFI_RFKILL
+ select RFKILL_INPUT if (IWLWIFI_RFKILL && INPUT)
config IWLWIFI_LEDS
bool
--- linux-next-20080624.orig/drivers/net/wireless/iwlwifi/iwl-rfkill.c
+++ linux-next-20080624/drivers/net/wireless/iwlwifi/iwl-rfkill.c
@@ -95,6 +95,7 @@ int iwl_rfkill_init(struct iwl_priv *pri
priv->rfkill_mngr.rfkill->dev.class->suspend = NULL;
priv->rfkill_mngr.rfkill->dev.class->resume = NULL;
+#if defined(CONFIG_RFKILL_INPUT) || defined(CONFIG_RFKILL_INPUT_MODULE)
priv->rfkill_mngr.input_dev = input_allocate_device();
if (!priv->rfkill_mngr.input_dev) {
IWL_ERROR("Unable to allocate rfkill input device.\n");
@@ -109,6 +110,7 @@ int iwl_rfkill_init(struct iwl_priv *pri
priv->rfkill_mngr.input_dev->dev.parent = device;
priv->rfkill_mngr.input_dev->evbit[0] = BIT(EV_KEY);
set_bit(KEY_WLAN, priv->rfkill_mngr.input_dev->keybit);
+#endif
ret = rfkill_register(priv->rfkill_mngr.rfkill);
if (ret) {
@@ -116,11 +118,13 @@ int iwl_rfkill_init(struct iwl_priv *pri
goto free_input_dev;
}
+#if defined(CONFIG_RFKILL_INPUT) || defined(CONFIG_RFKILL_INPUT_MODULE)
ret = input_register_device(priv->rfkill_mngr.input_dev);
if (ret) {
IWL_ERROR("Unable to register rfkill input device: %d\n", ret);
goto unregister_rfkill;
}
+#endif
IWL_DEBUG_RF_KILL("RFKILL initialization complete.\n");
return ret;
@@ -130,8 +134,10 @@ unregister_rfkill:
priv->rfkill_mngr.rfkill = NULL;
free_input_dev:
+#if defined(CONFIG_RFKILL_INPUT) || defined(CONFIG_RFKILL_INPUT_MODULE)
input_free_device(priv->rfkill_mngr.input_dev);
priv->rfkill_mngr.input_dev = NULL;
+#endif
freed_rfkill:
if (priv->rfkill_mngr.rfkill != NULL)
@@ -147,13 +153,16 @@ EXPORT_SYMBOL(iwl_rfkill_init);
void iwl_rfkill_unregister(struct iwl_priv *priv)
{
+#if defined(CONFIG_RFKILL_INPUT) || defined(CONFIG_RFKILL_INPUT_MODULE)
if (priv->rfkill_mngr.input_dev)
input_unregister_device(priv->rfkill_mngr.input_dev);
+ input_free_device(priv->rfkill_mngr.input_dev);
+ priv->rfkill_mngr.input_dev = NULL;
+#endif
if (priv->rfkill_mngr.rfkill)
rfkill_unregister(priv->rfkill_mngr.rfkill);
- priv->rfkill_mngr.input_dev = NULL;
priv->rfkill_mngr.rfkill = NULL;
}
EXPORT_SYMBOL(iwl_rfkill_unregister);
---
~Randy
Linux Plumbers Conference, 17-19 September 2008, Portland, Oregon USA
http://linuxplumbersconf.org/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH -next] iwlwifi: fix build for CONFIG_INPUT=n
2008-06-25 4:02 [PATCH -next] iwlwifi: fix build for CONFIG_INPUT=n Randy Dunlap
@ 2008-06-26 2:13 ` Zhu Yi
2008-06-26 14:23 ` Stephen Rothwell
0 siblings, 1 reply; 3+ messages in thread
From: Zhu Yi @ 2008-06-26 2:13 UTC (permalink / raw)
To: Randy Dunlap; +Cc: linux-wireless, linux-next, akpm, linville
On Tue, 2008-06-24 at 21:02 -0700, Randy Dunlap wrote:
> From: Randy Dunlap <randy.dunlap@oracle•com>
>
> Fix iwlwifi so that it builds cleanly with CONFIG_INPUT=n.
> Also free the input device on exit.
>
> drivers/built-in.o: In function `iwl_rfkill_unregister':
> (.text+0xbf430): undefined reference to `input_unregister_device'
> drivers/built-in.o: In function `iwl_rfkill_init':
> (.text+0xbf51c): undefined reference to `input_allocate_device'
> drivers/built-in.o: In function `iwl_rfkill_init':
> (.text+0xbf5bf): undefined reference to `input_register_device'
> drivers/built-in.o: In function `iwl_rfkill_init':
> (.text+0xbf5e9): undefined reference to `input_free_device'
> net/built-in.o: In function `rfkill_disconnect':
> rfkill-input.c:(.text+0xe71e1): undefined reference to
> `input_close_device'
> rfkill-input.c:(.text+0xe71e9): undefined reference to
> `input_unregister_handle'
> net/built-in.o: In function `rfkill_connect':
> rfkill-input.c:(.text+0xe723e): undefined reference to
> `input_register_handle'
> rfkill-input.c:(.text+0xe724d): undefined reference to
> `input_open_device'
> rfkill-input.c:(.text+0xe725c): undefined reference to
> `input_unregister_handle'
> net/built-in.o: In function `rfkill_handler_init':
> rfkill-input.c:(.init.text+0x36ec): undefined reference to
> `input_register_handler'
> net/built-in.o: In function `rfkill_handler_exit':
> rfkill-input.c:(.exit.text+0x112c): undefined reference to
> `input_unregister_handler'
> make[1]: *** [.tmp_vmlinux1] Error 1
>
> Signed-off-by: Randy Dunlap <randy.dunlap@oracle•com>
ACK.
Thanks,
-yi
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH -next] iwlwifi: fix build for CONFIG_INPUT=n
2008-06-26 2:13 ` Zhu Yi
@ 2008-06-26 14:23 ` Stephen Rothwell
0 siblings, 0 replies; 3+ messages in thread
From: Stephen Rothwell @ 2008-06-26 14:23 UTC (permalink / raw)
To: Zhu Yi; +Cc: Randy Dunlap, linux-wireless, linux-next, akpm, linville
[-- Attachment #1: Type: text/plain, Size: 1927 bytes --]
On Thu, 26 Jun 2008 10:13:30 +0800 Zhu Yi <yi.zhu@intel•com> wrote:
>
> On Tue, 2008-06-24 at 21:02 -0700, Randy Dunlap wrote:
> > From: Randy Dunlap <randy.dunlap@oracle•com>
> >
> > Fix iwlwifi so that it builds cleanly with CONFIG_INPUT=n.
> > Also free the input device on exit.
> >
> > drivers/built-in.o: In function `iwl_rfkill_unregister':
> > (.text+0xbf430): undefined reference to `input_unregister_device'
> > drivers/built-in.o: In function `iwl_rfkill_init':
> > (.text+0xbf51c): undefined reference to `input_allocate_device'
> > drivers/built-in.o: In function `iwl_rfkill_init':
> > (.text+0xbf5bf): undefined reference to `input_register_device'
> > drivers/built-in.o: In function `iwl_rfkill_init':
> > (.text+0xbf5e9): undefined reference to `input_free_device'
> > net/built-in.o: In function `rfkill_disconnect':
> > rfkill-input.c:(.text+0xe71e1): undefined reference to
> > `input_close_device'
> > rfkill-input.c:(.text+0xe71e9): undefined reference to
> > `input_unregister_handle'
> > net/built-in.o: In function `rfkill_connect':
> > rfkill-input.c:(.text+0xe723e): undefined reference to
> > `input_register_handle'
> > rfkill-input.c:(.text+0xe724d): undefined reference to
> > `input_open_device'
> > rfkill-input.c:(.text+0xe725c): undefined reference to
> > `input_unregister_handle'
> > net/built-in.o: In function `rfkill_handler_init':
> > rfkill-input.c:(.init.text+0x36ec): undefined reference to
> > `input_register_handler'
> > net/built-in.o: In function `rfkill_handler_exit':
> > rfkill-input.c:(.exit.text+0x112c): undefined reference to
> > `input_unregister_handler'
> > make[1]: *** [.tmp_vmlinux1] Error 1
> >
> > Signed-off-by: Randy Dunlap <randy.dunlap@oracle•com>
>
> ACK.
I have added this to today's linux-next tree.
--
Cheers,
Stephen Rothwell sfr@canb•auug.org.au
http://www.canb.auug.org.au/~sfr/
[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-06-26 14:23 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-25 4:02 [PATCH -next] iwlwifi: fix build for CONFIG_INPUT=n Randy Dunlap
2008-06-26 2:13 ` Zhu Yi
2008-06-26 14:23 ` Stephen Rothwell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox