aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/wl1251
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/wl1251')
-rw-r--r--drivers/net/wireless/wl1251/sdio.c35
1 files changed, 2 insertions, 33 deletions
diff --git a/drivers/net/wireless/wl1251/sdio.c b/drivers/net/wireless/wl1251/sdio.c
index f3e185efe124..596d90ecba33 100644
--- a/drivers/net/wireless/wl1251/sdio.c
+++ b/drivers/net/wireless/wl1251/sdio.c
@@ -43,8 +43,6 @@ struct wl1251_sdio {
43 u32 elp_val; 43 u32 elp_val;
44}; 44};
45 45
46static struct wl12xx_platform_data *wl12xx_board_data;
47
48static struct sdio_func *wl_to_func(struct wl1251 *wl) 46static struct sdio_func *wl_to_func(struct wl1251 *wl)
49{ 47{
50 struct wl1251_sdio *wl_sdio = wl->if_priv; 48 struct wl1251_sdio *wl_sdio = wl->if_priv;
@@ -219,30 +217,6 @@ static struct wl1251_if_operations wl1251_sdio_ops = {
219 .power = wl1251_sdio_set_power, 217 .power = wl1251_sdio_set_power,
220}; 218};
221 219
222static int wl1251_platform_probe(struct platform_device *pdev)
223{
224 if (pdev->id != -1) {
225 wl1251_error("can only handle single device");
226 return -ENODEV;
227 }
228
229 wl12xx_board_data = pdev->dev.platform_data;
230 return 0;
231}
232
233/*
234 * Dummy platform_driver for passing platform_data to this driver,
235 * until we have a way to pass this through SDIO subsystem or
236 * some other way.
237 */
238static struct platform_driver wl1251_platform_driver = {
239 .driver = {
240 .name = "wl1251_data",
241 .owner = THIS_MODULE,
242 },
243 .probe = wl1251_platform_probe,
244};
245
246static int wl1251_sdio_probe(struct sdio_func *func, 220static int wl1251_sdio_probe(struct sdio_func *func,
247 const struct sdio_device_id *id) 221 const struct sdio_device_id *id)
248{ 222{
@@ -250,6 +224,7 @@ static int wl1251_sdio_probe(struct sdio_func *func,
250 struct wl1251 *wl; 224 struct wl1251 *wl;
251 struct ieee80211_hw *hw; 225 struct ieee80211_hw *hw;
252 struct wl1251_sdio *wl_sdio; 226 struct wl1251_sdio *wl_sdio;
227 const struct wl12xx_platform_data *wl12xx_board_data;
253 228
254 hw = wl1251_alloc_hw(); 229 hw = wl1251_alloc_hw();
255 if (IS_ERR(hw)) 230 if (IS_ERR(hw))
@@ -276,6 +251,7 @@ static int wl1251_sdio_probe(struct sdio_func *func,
276 wl->if_priv = wl_sdio; 251 wl->if_priv = wl_sdio;
277 wl->if_ops = &wl1251_sdio_ops; 252 wl->if_ops = &wl1251_sdio_ops;
278 253
254 wl12xx_board_data = wl12xx_get_platform_data();
279 if (wl12xx_board_data != NULL) { 255 if (wl12xx_board_data != NULL) {
280 wl->set_power = wl12xx_board_data->set_power; 256 wl->set_power = wl12xx_board_data->set_power;
281 wl->irq = wl12xx_board_data->irq; 257 wl->irq = wl12xx_board_data->irq;
@@ -378,12 +354,6 @@ static int __init wl1251_sdio_init(void)
378{ 354{
379 int err; 355 int err;
380 356
381 err = platform_driver_register(&wl1251_platform_driver);
382 if (err) {
383 wl1251_error("failed to register platform driver: %d", err);
384 return err;
385 }
386
387 err = sdio_register_driver(&wl1251_sdio_driver); 357 err = sdio_register_driver(&wl1251_sdio_driver);
388 if (err) 358 if (err)
389 wl1251_error("failed to register sdio driver: %d", err); 359 wl1251_error("failed to register sdio driver: %d", err);
@@ -393,7 +363,6 @@ static int __init wl1251_sdio_init(void)
393static void __exit wl1251_sdio_exit(void) 363static void __exit wl1251_sdio_exit(void)
394{ 364{
395 sdio_unregister_driver(&wl1251_sdio_driver); 365 sdio_unregister_driver(&wl1251_sdio_driver);
396 platform_driver_unregister(&wl1251_platform_driver);
397 wl1251_notice("unloaded"); 366 wl1251_notice("unloaded");
398} 367}
399 368