Return-path: Received: from mail-fx0-f46.google.com ([209.85.161.46]:61681 "EHLO mail-fx0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753389Ab0L2QTx (ORCPT ); Wed, 29 Dec 2010 11:19:53 -0500 Received: by fxm20 with SMTP id 20so10567855fxm.19 for ; Wed, 29 Dec 2010 08:19:52 -0800 (PST) Message-ID: <4D1B5FA3.9010908@lwfinger.net> Date: Wed, 29 Dec 2010 10:19:47 -0600 From: Larry Finger MIME-Version: 1.0 To: Christoph Paasch CC: linville@tuxdriver.com, linux-wireless@vger.kernel.org, chunkeey@googlemail.com Subject: Re: [PATCH] p54: fix compiler-warning when no P54_LEDS are configured References: <1293635679-9783-1-git-send-email-christoph.paasch@uclouvain.be> In-Reply-To: <1293635679-9783-1-git-send-email-christoph.paasch@uclouvain.be> Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-wireless-owner@vger.kernel.org List-ID: On 12/29/2010 09:14 AM, Christoph Paasch wrote: > The priv-variable is unused when compiling without CONFIG_P54_LEDS. > > Signed-off-by: Christoph Paasch > --- > drivers/net/wireless/p54/main.c | 4 +++- > 1 files changed, 3 insertions(+), 1 deletions(-) > > diff --git a/drivers/net/wireless/p54/main.c b/drivers/net/wireless/p54/main.c > index 622d27b..a6802f5 100644 > --- a/drivers/net/wireless/p54/main.c > +++ b/drivers/net/wireless/p54/main.c > @@ -611,7 +611,9 @@ EXPORT_SYMBOL_GPL(p54_init_common); > > int p54_register_common(struct ieee80211_hw *dev, struct device *pdev) > { > +#ifdef CONFIG_P54_LEDS > struct p54_common *priv = dev->priv; > +#endif /* CONFIG_P54_LEDS */ > int err; > > err = ieee80211_register_hw(dev); > @@ -653,9 +655,9 @@ EXPORT_SYMBOL_GPL(p54_free_common); > > void p54_unregister_common(struct ieee80211_hw *dev) > { > +#ifdef CONFIG_P54_LEDS > struct p54_common *priv = dev->priv; > > -#ifdef CONFIG_P54_LEDS > p54_unregister_leds(priv); > #endif /* CONFIG_P54_LEDS */ > ACKed-by: Larry Finger