diff options
author | Adel Gadllah <adel.gadllah@gmail.com> | 2008-06-27 13:45:07 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-06-30 17:37:35 -0400 |
commit | 245727c1805d68e58810b58b24d967c5dd22a8fa (patch) | |
tree | 14f18c07f7c30405417fba5e007c2a38a151b8c0 /drivers/net/wireless | |
parent | ae6a44e3afae0e813e9ab707a2317b08e21f4ab2 (diff) |
iwlwifi: fix rfkill deps and remove input device usage
This patch fixes the rfkill deps for iwl4965/5000
and removes the input device usage.
Signed-off-by: Adel Gadllah <adel.gadllah@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/iwlwifi/Kconfig | 1 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-rfkill.c | 39 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-rfkill.h | 2 |
3 files changed, 0 insertions, 42 deletions
diff --git a/drivers/net/wireless/iwlwifi/Kconfig b/drivers/net/wireless/iwlwifi/Kconfig index d7ea32f39694..b628a44057f7 100644 --- a/drivers/net/wireless/iwlwifi/Kconfig +++ b/drivers/net/wireless/iwlwifi/Kconfig | |||
@@ -8,7 +8,6 @@ config IWLCORE | |||
8 | select MAC80211_LEDS if IWLWIFI_LEDS | 8 | select MAC80211_LEDS if IWLWIFI_LEDS |
9 | select LEDS_CLASS if IWLWIFI_LEDS | 9 | select LEDS_CLASS if IWLWIFI_LEDS |
10 | select RFKILL if IWLWIFI_RFKILL | 10 | select RFKILL if IWLWIFI_RFKILL |
11 | select RFKILL_INPUT if (IWLWIFI_RFKILL && INPUT) | ||
12 | 11 | ||
13 | config IWLWIFI_LEDS | 12 | config IWLWIFI_LEDS |
14 | bool | 13 | bool |
diff --git a/drivers/net/wireless/iwlwifi/iwl-rfkill.c b/drivers/net/wireless/iwlwifi/iwl-rfkill.c index 32b1c4b4c6a2..aa9f31eadab2 100644 --- a/drivers/net/wireless/iwlwifi/iwl-rfkill.c +++ b/drivers/net/wireless/iwlwifi/iwl-rfkill.c | |||
@@ -98,36 +98,11 @@ int iwl_rfkill_init(struct iwl_priv *priv) | |||
98 | priv->rfkill_mngr.rfkill->dev.class->suspend = NULL; | 98 | priv->rfkill_mngr.rfkill->dev.class->suspend = NULL; |
99 | priv->rfkill_mngr.rfkill->dev.class->resume = NULL; | 99 | priv->rfkill_mngr.rfkill->dev.class->resume = NULL; |
100 | 100 | ||
101 | #if defined(CONFIG_RFKILL_INPUT) || defined(CONFIG_RFKILL_INPUT_MODULE) | ||
102 | priv->rfkill_mngr.input_dev = input_allocate_device(); | ||
103 | if (!priv->rfkill_mngr.input_dev) { | ||
104 | IWL_ERROR("Unable to allocate rfkill input device.\n"); | ||
105 | ret = -ENOMEM; | ||
106 | goto freed_rfkill; | ||
107 | } | ||
108 | |||
109 | priv->rfkill_mngr.input_dev->name = priv->cfg->name; | ||
110 | priv->rfkill_mngr.input_dev->phys = wiphy_name(priv->hw->wiphy); | ||
111 | priv->rfkill_mngr.input_dev->id.bustype = BUS_HOST; | ||
112 | priv->rfkill_mngr.input_dev->id.vendor = priv->pci_dev->vendor; | ||
113 | priv->rfkill_mngr.input_dev->dev.parent = device; | ||
114 | priv->rfkill_mngr.input_dev->evbit[0] = BIT(EV_KEY); | ||
115 | set_bit(KEY_WLAN, priv->rfkill_mngr.input_dev->keybit); | ||
116 | #endif | ||
117 | |||
118 | ret = rfkill_register(priv->rfkill_mngr.rfkill); | 101 | ret = rfkill_register(priv->rfkill_mngr.rfkill); |
119 | if (ret) { | 102 | if (ret) { |
120 | IWL_ERROR("Unable to register rfkill: %d\n", ret); | 103 | IWL_ERROR("Unable to register rfkill: %d\n", ret); |
121 | goto free_input_dev; | ||
122 | } | ||
123 | |||
124 | #if defined(CONFIG_RFKILL_INPUT) || defined(CONFIG_RFKILL_INPUT_MODULE) | ||
125 | ret = input_register_device(priv->rfkill_mngr.input_dev); | ||
126 | if (ret) { | ||
127 | IWL_ERROR("Unable to register rfkill input device: %d\n", ret); | ||
128 | goto unregister_rfkill; | 104 | goto unregister_rfkill; |
129 | } | 105 | } |
130 | #endif | ||
131 | 106 | ||
132 | IWL_DEBUG_RF_KILL("RFKILL initialization complete.\n"); | 107 | IWL_DEBUG_RF_KILL("RFKILL initialization complete.\n"); |
133 | return ret; | 108 | return ret; |
@@ -136,12 +111,6 @@ unregister_rfkill: | |||
136 | rfkill_unregister(priv->rfkill_mngr.rfkill); | 111 | rfkill_unregister(priv->rfkill_mngr.rfkill); |
137 | priv->rfkill_mngr.rfkill = NULL; | 112 | priv->rfkill_mngr.rfkill = NULL; |
138 | 113 | ||
139 | free_input_dev: | ||
140 | #if defined(CONFIG_RFKILL_INPUT) || defined(CONFIG_RFKILL_INPUT_MODULE) | ||
141 | input_free_device(priv->rfkill_mngr.input_dev); | ||
142 | priv->rfkill_mngr.input_dev = NULL; | ||
143 | #endif | ||
144 | |||
145 | freed_rfkill: | 114 | freed_rfkill: |
146 | if (priv->rfkill_mngr.rfkill != NULL) | 115 | if (priv->rfkill_mngr.rfkill != NULL) |
147 | rfkill_free(priv->rfkill_mngr.rfkill); | 116 | rfkill_free(priv->rfkill_mngr.rfkill); |
@@ -156,13 +125,6 @@ EXPORT_SYMBOL(iwl_rfkill_init); | |||
156 | void iwl_rfkill_unregister(struct iwl_priv *priv) | 125 | void iwl_rfkill_unregister(struct iwl_priv *priv) |
157 | { | 126 | { |
158 | 127 | ||
159 | #if defined(CONFIG_RFKILL_INPUT) || defined(CONFIG_RFKILL_INPUT_MODULE) | ||
160 | if (priv->rfkill_mngr.input_dev) | ||
161 | input_unregister_device(priv->rfkill_mngr.input_dev); | ||
162 | input_free_device(priv->rfkill_mngr.input_dev); | ||
163 | priv->rfkill_mngr.input_dev = NULL; | ||
164 | #endif | ||
165 | |||
166 | if (priv->rfkill_mngr.rfkill) | 128 | if (priv->rfkill_mngr.rfkill) |
167 | rfkill_unregister(priv->rfkill_mngr.rfkill); | 129 | rfkill_unregister(priv->rfkill_mngr.rfkill); |
168 | 130 | ||
@@ -173,7 +135,6 @@ EXPORT_SYMBOL(iwl_rfkill_unregister); | |||
173 | /* set rf-kill to the right state. */ | 135 | /* set rf-kill to the right state. */ |
174 | void iwl_rfkill_set_hw_state(struct iwl_priv *priv) | 136 | void iwl_rfkill_set_hw_state(struct iwl_priv *priv) |
175 | { | 137 | { |
176 | |||
177 | if (!priv->rfkill_mngr.rfkill) | 138 | if (!priv->rfkill_mngr.rfkill) |
178 | return; | 139 | return; |
179 | 140 | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-rfkill.h b/drivers/net/wireless/iwlwifi/iwl-rfkill.h index b3c04dba45cf..00692d2e9bd8 100644 --- a/drivers/net/wireless/iwlwifi/iwl-rfkill.h +++ b/drivers/net/wireless/iwlwifi/iwl-rfkill.h | |||
@@ -31,12 +31,10 @@ | |||
31 | struct iwl_priv; | 31 | struct iwl_priv; |
32 | 32 | ||
33 | #include <linux/rfkill.h> | 33 | #include <linux/rfkill.h> |
34 | #include <linux/input.h> | ||
35 | 34 | ||
36 | #ifdef CONFIG_IWLWIFI_RFKILL | 35 | #ifdef CONFIG_IWLWIFI_RFKILL |
37 | struct iwl_rfkill_mngr { | 36 | struct iwl_rfkill_mngr { |
38 | struct rfkill *rfkill; | 37 | struct rfkill *rfkill; |
39 | struct input_dev *input_dev; | ||
40 | }; | 38 | }; |
41 | 39 | ||
42 | void iwl_rfkill_set_hw_state(struct iwl_priv *priv); | 40 | void iwl_rfkill_set_hw_state(struct iwl_priv *priv); |