diff mbox

cfg80211: fix compilation warning for cfg80211_leave_all()

Message ID 1371984681-3384-1-git-send-email-arend@broadcom.com (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Arend van Spriel June 23, 2013, 10:51 a.m. UTC
The following compilation issue popped up moving from v3.10-rc1 to
v3.10-rc6 after merging wireless-testing.

net/wireless/sysfs.c:86:13: error: 'cfg80211_leave_all' defined
but not used [-Werror=unused-function]

The function is only called when CONFIG_PM is enabled. Moving the
function under CONFIG_PM as well.

Signed-off-by: Arend van Spriel <arend@broadcom.com>
---
 net/wireless/sysfs.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Johannes Berg June 24, 2013, 1:58 p.m. UTC | #1
On Sun, 2013-06-23 at 12:51 +0200, Arend van Spriel wrote:
> The following compilation issue popped up moving from v3.10-rc1 to
> v3.10-rc6 after merging wireless-testing.
> 
> net/wireless/sysfs.c:86:13: error: 'cfg80211_leave_all' defined
> but not used [-Werror=unused-function]
> 
> The function is only called when CONFIG_PM is enabled. Moving the
> function under CONFIG_PM as well.

Applied.

johannes

--
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
diff mbox

Patch

diff --git a/net/wireless/sysfs.c b/net/wireless/sysfs.c
index 360a42c..a23253e 100644
--- a/net/wireless/sysfs.c
+++ b/net/wireless/sysfs.c
@@ -83,6 +83,7 @@  static int wiphy_uevent(struct device *dev, struct kobj_uevent_env *env)
 	return 0;
 }
 
+#ifdef CONFIG_PM
 static void cfg80211_leave_all(struct cfg80211_registered_device *rdev)
 {
 	struct wireless_dev *wdev;
@@ -91,7 +92,6 @@  static void cfg80211_leave_all(struct cfg80211_registered_device *rdev)
 		cfg80211_leave(rdev, wdev);
 }
 
-#ifdef CONFIG_PM
 static int wiphy_suspend(struct device *dev, pm_message_t state)
 {
 	struct cfg80211_registered_device *rdev = dev_to_rdev(dev);