Skip to content

Commit a33d402

Browse files
Arend van Sprieljmberg-intel
authored andcommitted
cfg80211: fix compilation warning for cfg80211_leave_all()
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> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
1 parent f9bef3d commit a33d402

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎net/wireless/sysfs.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ static int wiphy_uevent(struct device *dev, struct kobj_uevent_env *env)
8383
return 0;
8484
}
8585

86+
#ifdef CONFIG_PM
8687
static void cfg80211_leave_all(struct cfg80211_registered_device *rdev)
8788
{
8889
struct wireless_dev *wdev;
@@ -91,7 +92,6 @@ static void cfg80211_leave_all(struct cfg80211_registered_device *rdev)
9192
cfg80211_leave(rdev, wdev);
9293
}
9394

94-
#ifdef CONFIG_PM
9595
static int wiphy_suspend(struct device *dev, pm_message_t state)
9696
{
9797
struct cfg80211_registered_device *rdev = dev_to_rdev(dev);

0 commit comments

Comments
 (0)