diff options
author | Christian Lamparter <chunkeey@web.de> | 2009-03-23 10:37:45 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-03-27 20:13:06 -0400 |
commit | d8cd7effc20027c313d4086b123046ff9f9a5814 (patch) | |
tree | ebc7547b758d79144260a0975082a38dcbe9b5c3 | |
parent | eec60b037a875513d9715dcdb90b13ed81fc5f26 (diff) |
p54: fix SoftLED compile dependencies
This patch fixes a compile problem when the MAC80211_LEDS
triggers are enabled but not LED class itself.
(which is sort of pointless, but anyway...)
Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/p54/Kconfig | 5 | ||||
-rw-r--r-- | drivers/net/wireless/p54/p54common.c | 16 |
2 files changed, 13 insertions, 8 deletions
diff --git a/drivers/net/wireless/p54/Kconfig b/drivers/net/wireless/p54/Kconfig index 0e344ac10d2c..7d6e9d108203 100644 --- a/drivers/net/wireless/p54/Kconfig +++ b/drivers/net/wireless/p54/Kconfig | |||
@@ -71,3 +71,8 @@ config P54_SPI | |||
71 | Nokia's N800/N810 Portable Internet Tablet. | 71 | Nokia's N800/N810 Portable Internet Tablet. |
72 | 72 | ||
73 | If you choose to build a module, it'll be called p54spi. | 73 | If you choose to build a module, it'll be called p54spi. |
74 | |||
75 | config P54_LEDS | ||
76 | bool | ||
77 | depends on P54_COMMON && MAC80211_LEDS && (LEDS_CLASS = y || LEDS_CLASS = P54_COMMON) | ||
78 | default y | ||
diff --git a/drivers/net/wireless/p54/p54common.c b/drivers/net/wireless/p54/p54common.c index 0a989834b70d..0c1b0577d4ee 100644 --- a/drivers/net/wireless/p54/p54common.c +++ b/drivers/net/wireless/p54/p54common.c | |||
@@ -21,9 +21,9 @@ | |||
21 | #include <linux/etherdevice.h> | 21 | #include <linux/etherdevice.h> |
22 | 22 | ||
23 | #include <net/mac80211.h> | 23 | #include <net/mac80211.h> |
24 | #ifdef CONFIG_MAC80211_LEDS | 24 | #ifdef CONFIG_P54_LEDS |
25 | #include <linux/leds.h> | 25 | #include <linux/leds.h> |
26 | #endif /* CONFIG_MAC80211_LEDS */ | 26 | #endif /* CONFIG_P54_LEDS */ |
27 | 27 | ||
28 | #include "p54.h" | 28 | #include "p54.h" |
29 | #include "p54common.h" | 29 | #include "p54common.h" |
@@ -2420,7 +2420,7 @@ static int p54_set_key(struct ieee80211_hw *dev, enum set_key_cmd cmd, | |||
2420 | return 0; | 2420 | return 0; |
2421 | } | 2421 | } |
2422 | 2422 | ||
2423 | #ifdef CONFIG_MAC80211_LEDS | 2423 | #ifdef CONFIG_P54_LEDS |
2424 | static void p54_led_brightness_set(struct led_classdev *led_dev, | 2424 | static void p54_led_brightness_set(struct led_classdev *led_dev, |
2425 | enum led_brightness brightness) | 2425 | enum led_brightness brightness) |
2426 | { | 2426 | { |
@@ -2508,7 +2508,7 @@ static void p54_unregister_leds(struct ieee80211_hw *dev) | |||
2508 | if (priv->assoc_led.registered) | 2508 | if (priv->assoc_led.registered) |
2509 | led_classdev_unregister(&priv->assoc_led.led_dev); | 2509 | led_classdev_unregister(&priv->assoc_led.led_dev); |
2510 | } | 2510 | } |
2511 | #endif /* CONFIG_MAC80211_LEDS */ | 2511 | #endif /* CONFIG_P54_LEDS */ |
2512 | 2512 | ||
2513 | static const struct ieee80211_ops p54_ops = { | 2513 | static const struct ieee80211_ops p54_ops = { |
2514 | .tx = p54_tx, | 2514 | .tx = p54_tx, |
@@ -2592,11 +2592,11 @@ int p54_register_common(struct ieee80211_hw *dev, struct device *pdev) | |||
2592 | return err; | 2592 | return err; |
2593 | } | 2593 | } |
2594 | 2594 | ||
2595 | #ifdef CONFIG_MAC80211_LEDS | 2595 | #ifdef CONFIG_P54_LEDS |
2596 | err = p54_init_leds(dev); | 2596 | err = p54_init_leds(dev); |
2597 | if (err) | 2597 | if (err) |
2598 | return err; | 2598 | return err; |
2599 | #endif /* CONFIG_MAC80211_LEDS */ | 2599 | #endif /* CONFIG_P54_LEDS */ |
2600 | 2600 | ||
2601 | dev_info(pdev, "is registered as '%s'\n", wiphy_name(dev->wiphy)); | 2601 | dev_info(pdev, "is registered as '%s'\n", wiphy_name(dev->wiphy)); |
2602 | return 0; | 2602 | return 0; |
@@ -2610,9 +2610,9 @@ void p54_free_common(struct ieee80211_hw *dev) | |||
2610 | kfree(priv->output_limit); | 2610 | kfree(priv->output_limit); |
2611 | kfree(priv->curve_data); | 2611 | kfree(priv->curve_data); |
2612 | 2612 | ||
2613 | #ifdef CONFIG_MAC80211_LEDS | 2613 | #ifdef CONFIG_P54_LEDS |
2614 | p54_unregister_leds(dev); | 2614 | p54_unregister_leds(dev); |
2615 | #endif /* CONFIG_MAC80211_LEDS */ | 2615 | #endif /* CONFIG_P54_LEDS */ |
2616 | } | 2616 | } |
2617 | EXPORT_SYMBOL_GPL(p54_free_common); | 2617 | EXPORT_SYMBOL_GPL(p54_free_common); |
2618 | 2618 | ||