Re: [PATCH] brcmsmac: Fix build dep on LEDS_CLASS

From: Borislav Petkov
Date: Sun Nov 17 2013 - 18:03:12 EST


On Sun, Nov 17, 2013 at 10:31:07PM +0100, Arend van Spriel wrote:
> Wouldn't it be better to fix it in brcmsmac.

You're right, BCMA_DRIVER_GPIO doesn't need LEDS_CLASS.

So, the only solution I can think of right now is below, maybe
adding a hidden config symbol CONFIG_BRCMSMAC_LEDS which depends on
BCMA_DRIVER_GPIO and LEDS_CLASS and then doing:

brcmsmac-$(CONFIG_BRCMSMAC_LEDS) += led.o

would be cleaner though. I could try that out tomorrow.

---
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/Makefile b/drivers/net/wireless/brcm80211/brcmsmac/Makefile
index 32464acccd90..8fd44d168cd5 100644
--- a/drivers/net/wireless/brcm80211/brcmsmac/Makefile
+++ b/drivers/net/wireless/brcm80211/brcmsmac/Makefile
@@ -43,6 +43,8 @@ brcmsmac-y := \
brcms_trace_events.o \
debug.o

+ifdef CONFIG_LEDS_CLASS
brcmsmac-$(CONFIG_BCMA_DRIVER_GPIO) += led.o
+endif

obj-$(CONFIG_BRCMSMAC) += brcmsmac.o
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/led.h b/drivers/net/wireless/brcm80211/brcmsmac/led.h
index 17a0b1f5dbcf..23b4b688d9f7 100644
--- a/drivers/net/wireless/brcm80211/brcmsmac/led.h
+++ b/drivers/net/wireless/brcm80211/brcmsmac/led.h
@@ -22,7 +22,7 @@ struct brcms_led {
bool active_low;
};

-#ifdef CONFIG_BCMA_DRIVER_GPIO
+#if defined(CONFIG_BCMA_DRIVER_GPIO) && defined(CONFIG_LEDS_CLASS)
void brcms_led_unregister(struct brcms_info *wl);
int brcms_led_register(struct brcms_info *wl);
#else

--
Regards/Gruss,
Boris.

Sent from a fat crate under my desk. Formatting is fine.
--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/