diff mbox

brcmsmac: Fix build dep on LEDS_CLASS

Message ID 20131117133702.GA30840@pd.tnic (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Borislav Petkov Nov. 17, 2013, 1:37 p.m. UTC
From: Borislav Petkov <bp@suse.de>

When building randconfigs with CONFIG_BCMA_DRIVER_GPIO=y, I get

drivers/built-in.o: In function `brcms_led_unregister':
(.text+0x351aca): undefined reference to `led_classdev_unregister'
drivers/built-in.o: In function `brcms_led_register':
(.text+0x351c65): undefined reference to `led_classdev_register'

during the final linking stage because brcmsmac/led.c needs LEDS_CLASS
for reg/dereg. Fix that.

Cc: "Rafa? Mi?ecki" <zajec5@gmail.com>
Cc: linux-wireless@vger.kernel.org
Signed-off-by: Borislav Petkov <bp@suse.de>
---

I'm attaching the .config in question.

 drivers/bcma/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Arend van Spriel Nov. 17, 2013, 9:31 p.m. UTC | #1
On 11/17/13 14:37, Borislav Petkov wrote:
> From: Borislav Petkov<bp@suse.de>
>
> When building randconfigs with CONFIG_BCMA_DRIVER_GPIO=y, I get
>
> drivers/built-in.o: In function `brcms_led_unregister':
> (.text+0x351aca): undefined reference to `led_classdev_unregister'
> drivers/built-in.o: In function `brcms_led_register':
> (.text+0x351c65): undefined reference to `led_classdev_register'
>
> during the final linking stage because brcmsmac/led.c needs LEDS_CLASS
> for reg/dereg. Fix that.

Wouldn't it be better to fix it in brcmsmac.

Gr AvS

> Cc: "Rafa? Mi?ecki"<zajec5@gmail.com>
> Cc: linux-wireless@vger.kernel.org
> Signed-off-by: Borislav Petkov<bp@suse.de>
> ---
>
> I'm attaching the .config in question.
>
>   drivers/bcma/Kconfig | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/bcma/Kconfig b/drivers/bcma/Kconfig
> index 7c081b38ef3e..74dba9ca1413 100644
> --- a/drivers/bcma/Kconfig
> +++ b/drivers/bcma/Kconfig
> @@ -74,7 +74,7 @@ config BCMA_DRIVER_GMAC_CMN
>
>   config BCMA_DRIVER_GPIO
>   	bool "BCMA GPIO driver"
> -	depends on BCMA&&  GPIOLIB
> +	depends on BCMA&&  GPIOLIB&&  LEDS_CLASS
>   	help
>   	  Driver to provide access to the GPIO pins of the bcma bus.
>


--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Rafał Miłecki Nov. 18, 2013, 11:58 a.m. UTC | #2
2013/11/17 Arend van Spriel <arend@broadcom.com>:
> On 11/17/13 14:37, Borislav Petkov wrote:
>>
>> From: Borislav Petkov<bp@suse.de>
>>
>> When building randconfigs with CONFIG_BCMA_DRIVER_GPIO=y, I get
>>
>> drivers/built-in.o: In function `brcms_led_unregister':
>> (.text+0x351aca): undefined reference to `led_classdev_unregister'
>> drivers/built-in.o: In function `brcms_led_register':
>> (.text+0x351c65): undefined reference to `led_classdev_register'
>>
>> during the final linking stage because brcmsmac/led.c needs LEDS_CLASS
>> for reg/dereg. Fix that.
>
>
> Wouldn't it be better to fix it in brcmsmac.

I agree. After all bcma doesn't use/register LEDs, so this should be
placed in drivers that do.

P.S.
Borislav: I think I didn't get your original patch.
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Borislav Petkov Nov. 18, 2013, 1:32 p.m. UTC | #3
On Mon, Nov 18, 2013 at 12:58:58PM +0100, Rafa? Mi?ecki wrote:
> Borislav: I think I didn't get your original patch.

Forget it, I'll send a better one later.
diff mbox

Patch

diff --git a/drivers/bcma/Kconfig b/drivers/bcma/Kconfig
index 7c081b38ef3e..74dba9ca1413 100644
--- a/drivers/bcma/Kconfig
+++ b/drivers/bcma/Kconfig
@@ -74,7 +74,7 @@  config BCMA_DRIVER_GMAC_CMN
 
 config BCMA_DRIVER_GPIO
 	bool "BCMA GPIO driver"
-	depends on BCMA && GPIOLIB
+	depends on BCMA && GPIOLIB && LEDS_CLASS
 	help
 	  Driver to provide access to the GPIO pins of the bcma bus.