Skip to contentSkip to conversation

cfg80211: sysfs: use wiphy_name()

PATCH New Johannes Berg 1 participant 1 message Jan 4, 2017 802.11 (including cfg80211/NL80211)

lore
Share & tools
lore

Johannes Berg

author maintainer
#0 lore raw

PATCH 1/1 cfg80211: sysfs: use wiphy_name()

From: Johannes Berg <[email protected]>

Instead of open-coding dev_name(), use the wiphy_name() inline to make the code easier to understand. While at it, clean up some coding style.

---
 net/wireless/sysfs.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
net/wireless/sysfs.c +4 -2
index 14b3f007826d..16b6b5988be9 100644
@@ -39,9 +39,11 @@ SHOW_FMT(address_mask, "%pM", wiphy.addr_mask);
 
 static ssize_t name_show(struct device *dev,
 			 struct device_attribute *attr,
-			 char *buf) {
+			 char *buf)
+{
 	struct wiphy *wiphy = &dev_to_rdev(dev)->wiphy;
-	return sprintf(buf, "%s\n", dev_name(&wiphy->dev));
+
+	return sprintf(buf, "%s\n", wiphy_name(wiphy));
 }
 static DEVICE_ATTR_RO(name);
 
Signature · 1 line
2.9.3