Skip to content

Commit c68115f

Browse files
arndbKalle Valo
authored andcommitted
brcmsmac: rework LED dependencies
This is now the only driver that selects the LEDS_CLASS framework, which is normally user-selectable. While it doesn't strictly cause a bug, rework the Kconfig logic to be more consistent with what other drivers do, and only enable LED support in brcmsmac if the dependencies are all there, rather than using 'select' to enable what it needs. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20211204173848.873293-2-arnd@kernel.org
1 parent efdbfa0 commit c68115f

File tree

3 files changed

+11
-7
lines changed

3 files changed

+11
-7
lines changed

drivers/net/wireless/broadcom/brcm80211/Kconfig

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,20 @@ config BRCMSMAC
77
depends on MAC80211
88
depends on BCMA_POSSIBLE
99
select BCMA
10-
select NEW_LEDS if BCMA_DRIVER_GPIO
11-
select LEDS_CLASS if BCMA_DRIVER_GPIO
1210
select BRCMUTIL
1311
select FW_LOADER
1412
select CORDIC
1513
help
1614
This module adds support for PCIe wireless adapters based on Broadcom
17-
IEEE802.11n SoftMAC chipsets. It also has WLAN led support, which will
18-
be available if you select BCMA_DRIVER_GPIO. If you choose to build a
19-
module, the driver will be called brcmsmac.ko.
15+
IEEE802.11n SoftMAC chipsets. If you choose to build a module, the
16+
driver will be called brcmsmac.ko.
17+
18+
config BRCMSMAC_LEDS
19+
def_bool BRCMSMAC && BCMA_DRIVER_GPIO && MAC80211_LEDS
20+
help
21+
The brcmsmac LED support depends on the presence of the
22+
BCMA_DRIVER_GPIO driver, and it only works if LED support
23+
is enabled and reachable from the driver module.
2024

2125
source "drivers/net/wireless/broadcom/brcm80211/brcmfmac/Kconfig"
2226

drivers/net/wireless/broadcom/brcm80211/brcmsmac/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,6 @@ brcmsmac-y := \
4242
brcms_trace_events.o \
4343
debug.o
4444

45-
brcmsmac-$(CONFIG_BCMA_DRIVER_GPIO) += led.o
45+
brcmsmac-$(CONFIG_BRCMSMAC_LEDS) += led.o
4646

4747
obj-$(CONFIG_BRCMSMAC) += brcmsmac.o

drivers/net/wireless/broadcom/brcm80211/brcmsmac/led.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ struct brcms_led {
2424
struct gpio_desc *gpiod;
2525
};
2626

27-
#ifdef CONFIG_BCMA_DRIVER_GPIO
27+
#ifdef CONFIG_BRCMSMAC_LEDS
2828
void brcms_led_unregister(struct brcms_info *wl);
2929
int brcms_led_register(struct brcms_info *wl);
3030
#else

0 commit comments

Comments
 (0)