All of lore.kernel.org
 help / color / mirror / Atom feed
From: Borislav Petkov <bp@alien8.de>
To: Arend van Spriel <arend@broadcom.com>
Cc: lkml <linux-kernel@vger.kernel.org>,
	"Rafał Miłecki" <zajec5@gmail.com>,
	linux-wireless@vger.kernel.org
Subject: Re: [PATCH] brcmsmac: Fix build dep on LEDS_CLASS
Date: Mon, 18 Nov 2013 00:02:20 +0100	[thread overview]
Message-ID: <20131117230220.GS27323@pd.tnic> (raw)
In-Reply-To: <5289359B.8090506@broadcom.com>

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.
--

  reply	other threads:[~2013-11-17 23:02 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-17 13:37 [PATCH] brcmsmac: Fix build dep on LEDS_CLASS Borislav Petkov
2013-11-17 21:31 ` Arend van Spriel
2013-11-17 23:02   ` Borislav Petkov [this message]
2013-11-18 11:58   ` Rafał Miłecki
2013-11-18 13:32     ` Borislav Petkov
2013-11-18 20:40       ` Borislav Petkov
2013-11-18 22:19         ` Arend van Spriel
2013-11-18 23:32           ` Borislav Petkov
2013-11-19  9:11             ` Arend van Spriel
2013-11-19 10:36               ` Borislav Petkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20131117230220.GS27323@pd.tnic \
    --to=bp@alien8.de \
    --cc=arend@broadcom.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=zajec5@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.