Commit d8cd7eff authored by Christian Lamparter's avatar Christian Lamparter Committed by John W. Linville

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: default avatarChristian Lamparter <chunkeey@web.de>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent eec60b03
...@@ -71,3 +71,8 @@ config P54_SPI ...@@ -71,3 +71,8 @@ config P54_SPI
Nokia's N800/N810 Portable Internet Tablet. Nokia's N800/N810 Portable Internet Tablet.
If you choose to build a module, it'll be called p54spi. If you choose to build a module, it'll be called p54spi.
config P54_LEDS
bool
depends on P54_COMMON && MAC80211_LEDS && (LEDS_CLASS = y || LEDS_CLASS = P54_COMMON)
default y
...@@ -21,9 +21,9 @@ ...@@ -21,9 +21,9 @@
#include <linux/etherdevice.h> #include <linux/etherdevice.h>
#include <net/mac80211.h> #include <net/mac80211.h>
#ifdef CONFIG_MAC80211_LEDS #ifdef CONFIG_P54_LEDS
#include <linux/leds.h> #include <linux/leds.h>
#endif /* CONFIG_MAC80211_LEDS */ #endif /* CONFIG_P54_LEDS */
#include "p54.h" #include "p54.h"
#include "p54common.h" #include "p54common.h"
...@@ -2420,7 +2420,7 @@ static int p54_set_key(struct ieee80211_hw *dev, enum set_key_cmd cmd, ...@@ -2420,7 +2420,7 @@ static int p54_set_key(struct ieee80211_hw *dev, enum set_key_cmd cmd,
return 0; return 0;
} }
#ifdef CONFIG_MAC80211_LEDS #ifdef CONFIG_P54_LEDS
static void p54_led_brightness_set(struct led_classdev *led_dev, static void p54_led_brightness_set(struct led_classdev *led_dev,
enum led_brightness brightness) enum led_brightness brightness)
{ {
...@@ -2508,7 +2508,7 @@ static void p54_unregister_leds(struct ieee80211_hw *dev) ...@@ -2508,7 +2508,7 @@ static void p54_unregister_leds(struct ieee80211_hw *dev)
if (priv->assoc_led.registered) if (priv->assoc_led.registered)
led_classdev_unregister(&priv->assoc_led.led_dev); led_classdev_unregister(&priv->assoc_led.led_dev);
} }
#endif /* CONFIG_MAC80211_LEDS */ #endif /* CONFIG_P54_LEDS */
static const struct ieee80211_ops p54_ops = { static const struct ieee80211_ops p54_ops = {
.tx = p54_tx, .tx = p54_tx,
...@@ -2592,11 +2592,11 @@ int p54_register_common(struct ieee80211_hw *dev, struct device *pdev) ...@@ -2592,11 +2592,11 @@ int p54_register_common(struct ieee80211_hw *dev, struct device *pdev)
return err; return err;
} }
#ifdef CONFIG_MAC80211_LEDS #ifdef CONFIG_P54_LEDS
err = p54_init_leds(dev); err = p54_init_leds(dev);
if (err) if (err)
return err; return err;
#endif /* CONFIG_MAC80211_LEDS */ #endif /* CONFIG_P54_LEDS */
dev_info(pdev, "is registered as '%s'\n", wiphy_name(dev->wiphy)); dev_info(pdev, "is registered as '%s'\n", wiphy_name(dev->wiphy));
return 0; return 0;
...@@ -2610,9 +2610,9 @@ void p54_free_common(struct ieee80211_hw *dev) ...@@ -2610,9 +2610,9 @@ void p54_free_common(struct ieee80211_hw *dev)
kfree(priv->output_limit); kfree(priv->output_limit);
kfree(priv->curve_data); kfree(priv->curve_data);
#ifdef CONFIG_MAC80211_LEDS #ifdef CONFIG_P54_LEDS
p54_unregister_leds(dev); p54_unregister_leds(dev);
#endif /* CONFIG_MAC80211_LEDS */ #endif /* CONFIG_P54_LEDS */
} }
EXPORT_SYMBOL_GPL(p54_free_common); EXPORT_SYMBOL_GPL(p54_free_common);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment