diff options
author | Luciano Coelho <coelho@ti.com> | 2011-05-18 16:51:26 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-05-18 16:51:26 -0400 |
commit | f634a4e7074f66ac3dfaf2cc6786e0ec3080a2d1 (patch) | |
tree | 40f377217726faae85b9c67f88a634bd930359fa /drivers | |
parent | b56269468483a0255a27126ebc2ae7e321638d7b (diff) |
wl12xx: fix compilation error when CONFIG_PM is not set
There was a compilation error when PM is not enabled:
CC [M] drivers/net/wireless/wl12xx/main.o
drivers/net/wireless/wl12xx/main.c:3653: error: unknown field 'suspend' specified in initializer
drivers/net/wireless/wl12xx/main.c:3653: warning: initialization from incompatible pointer type
drivers/net/wireless/wl12xx/main.c:3654: error: unknown field 'resume' specified in initializer
drivers/net/wireless/wl12xx/main.c:3654: warning: initialization from incompatible pointer type
Fix this by adding #ifdef's in the appropriate places.
Cc: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/wl12xx/main.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/sdio.c | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c index 610be03a198..bc00e52f644 100644 --- a/drivers/net/wireless/wl12xx/main.c +++ b/drivers/net/wireless/wl12xx/main.c | |||
@@ -1350,6 +1350,7 @@ static struct notifier_block wl1271_dev_notifier = { | |||
1350 | .notifier_call = wl1271_dev_notify, | 1350 | .notifier_call = wl1271_dev_notify, |
1351 | }; | 1351 | }; |
1352 | 1352 | ||
1353 | #ifdef CONFIG_PM | ||
1353 | static int wl1271_configure_suspend(struct wl1271 *wl) | 1354 | static int wl1271_configure_suspend(struct wl1271 *wl) |
1354 | { | 1355 | { |
1355 | int ret; | 1356 | int ret; |
@@ -1493,6 +1494,7 @@ static int wl1271_op_resume(struct ieee80211_hw *hw) | |||
1493 | 1494 | ||
1494 | return 0; | 1495 | return 0; |
1495 | } | 1496 | } |
1497 | #endif | ||
1496 | 1498 | ||
1497 | static int wl1271_op_start(struct ieee80211_hw *hw) | 1499 | static int wl1271_op_start(struct ieee80211_hw *hw) |
1498 | { | 1500 | { |
@@ -3650,8 +3652,10 @@ static const struct ieee80211_ops wl1271_ops = { | |||
3650 | .stop = wl1271_op_stop, | 3652 | .stop = wl1271_op_stop, |
3651 | .add_interface = wl1271_op_add_interface, | 3653 | .add_interface = wl1271_op_add_interface, |
3652 | .remove_interface = wl1271_op_remove_interface, | 3654 | .remove_interface = wl1271_op_remove_interface, |
3655 | #ifdef CONFIG_PM | ||
3653 | .suspend = wl1271_op_suspend, | 3656 | .suspend = wl1271_op_suspend, |
3654 | .resume = wl1271_op_resume, | 3657 | .resume = wl1271_op_resume, |
3658 | #endif | ||
3655 | .config = wl1271_op_config, | 3659 | .config = wl1271_op_config, |
3656 | .prepare_multicast = wl1271_op_prepare_multicast, | 3660 | .prepare_multicast = wl1271_op_prepare_multicast, |
3657 | .configure_filter = wl1271_op_configure_filter, | 3661 | .configure_filter = wl1271_op_configure_filter, |
diff --git a/drivers/net/wireless/wl12xx/sdio.c b/drivers/net/wireless/wl12xx/sdio.c index 92d29a860fc..536e5065454 100644 --- a/drivers/net/wireless/wl12xx/sdio.c +++ b/drivers/net/wireless/wl12xx/sdio.c | |||
@@ -330,6 +330,7 @@ static void __devexit wl1271_remove(struct sdio_func *func) | |||
330 | wl1271_free_hw(wl); | 330 | wl1271_free_hw(wl); |
331 | } | 331 | } |
332 | 332 | ||
333 | #ifdef CONFIG_PM | ||
333 | static int wl1271_suspend(struct device *dev) | 334 | static int wl1271_suspend(struct device *dev) |
334 | { | 335 | { |
335 | /* Tell MMC/SDIO core it's OK to power down the card | 336 | /* Tell MMC/SDIO core it's OK to power down the card |
@@ -385,15 +386,18 @@ static const struct dev_pm_ops wl1271_sdio_pm_ops = { | |||
385 | .suspend = wl1271_suspend, | 386 | .suspend = wl1271_suspend, |
386 | .resume = wl1271_resume, | 387 | .resume = wl1271_resume, |
387 | }; | 388 | }; |
389 | #endif | ||
388 | 390 | ||
389 | static struct sdio_driver wl1271_sdio_driver = { | 391 | static struct sdio_driver wl1271_sdio_driver = { |
390 | .name = "wl1271_sdio", | 392 | .name = "wl1271_sdio", |
391 | .id_table = wl1271_devices, | 393 | .id_table = wl1271_devices, |
392 | .probe = wl1271_probe, | 394 | .probe = wl1271_probe, |
393 | .remove = __devexit_p(wl1271_remove), | 395 | .remove = __devexit_p(wl1271_remove), |
396 | #ifdef CONFIG_PM | ||
394 | .drv = { | 397 | .drv = { |
395 | .pm = &wl1271_sdio_pm_ops, | 398 | .pm = &wl1271_sdio_pm_ops, |
396 | }, | 399 | }, |
400 | #endif | ||
397 | }; | 401 | }; |
398 | 402 | ||
399 | static int __init wl1271_init(void) | 403 | static int __init wl1271_init(void) |