summaryrefslogtreecommitdiff
path: root/net/wireless/sysfs.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2017-01-04 08:24:49 +0100
committerJohannes Berg <johannes.berg@intel.com>2017-01-04 08:24:49 +0100
commit5ec71dd7f1b63da20fefebabf1e66cb530b9eb4d (patch)
tree34d669bcf4f27e02211e5da71dabe6fc3edf768c /net/wireless/sysfs.c
parentb7f98864de216dc450e6d535c67bd3d7680df2a3 (diff)
cfg80211: sysfs: use wiphy_name()
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. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless/sysfs.c')
-rw-r--r--net/wireless/sysfs.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/net/wireless/sysfs.c b/net/wireless/sysfs.c
index 14b3f007826d..16b6b5988be9 100644
--- a/net/wireless/sysfs.c
+++ b/net/wireless/sysfs.c
@@ -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);