summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/broadcom/brcm80211/brcmsmac
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2022-10-28 12:23:32 +0300
committerKalle Valo <kvalo@kernel.org>2022-11-04 13:59:25 +0300
commit2b6c0e152868c9c5939a5c5094d5b2be61cf48e6 (patch)
treed20b23dcaf1822bd1857ecee2fdb2c38df825ee6 /drivers/net/wireless/broadcom/brcm80211/brcmsmac
parent81d17f6f3331f03c8eafdacea68ab773426c1e3c (diff)
downloadlinux-2b6c0e152868c9c5939a5c5094d5b2be61cf48e6.tar.xz
bcma: Use the proper gpio include
The <linux/bcma/bcma_driver_chipcommon.h> is including the legacy header <linux/gpio.h> to obtain struct gpio_chip. Instead, include <linux/gpio/driver.h> where this struct is defined. It turns out that the brcm80211 brcmsmac depends on this to bring in the symbol gpio_is_valid(). The driver looks up the BCMA parent GPIO driver and checks that this succeeds, but then it goes on to use the deprecated GPIO call gpio_is_valid() to check the consistency of the .base member of the BCMA GPIO struct. The whole check can be dropped because the bcma_gpio is initialized in the declarations: struct gpio_chip *bcma_gpio = &cc_drv->gpio; And this can never be NULL. Cc: Jonas Gorski <jonas.gorski@gmail.com> Acked-by: Arend van Spriel <arend.vanspriel@broadcom.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20221028092332.238728-1-linus.walleij@linaro.org
Diffstat (limited to 'drivers/net/wireless/broadcom/brcm80211/brcmsmac')
-rw-r--r--drivers/net/wireless/broadcom/brcm80211/brcmsmac/led.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmsmac/led.c b/drivers/net/wireless/broadcom/brcm80211/brcmsmac/led.c
index c1b9ac692d26..9540a05247c2 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmsmac/led.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmsmac/led.c
@@ -63,9 +63,6 @@ int brcms_led_register(struct brcms_info *wl)
int hwnum = -1;
enum gpio_lookup_flags lflags = GPIO_ACTIVE_HIGH;
- if (!bcma_gpio || !gpio_is_valid(bcma_gpio->base))
- return -ENODEV;
-
/* find radio enabled LED */
for (i = 0; i < BRCMS_LED_NO; i++) {
u8 led = *leds[i];