Skip to content

Commit 5ec71dd

Browse files
committed
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>
1 parent b7f9886 commit 5ec71dd

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

‎net/wireless/sysfs.c‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,11 @@ SHOW_FMT(address_mask, "%pM", wiphy.addr_mask);
3939

4040
static ssize_t name_show(struct device *dev,
4141
struct device_attribute *attr,
42-
char *buf) {
42+
char *buf)
43+
{
4344
struct wiphy *wiphy = &dev_to_rdev(dev)->wiphy;
44-
return sprintf(buf, "%s\n", dev_name(&wiphy->dev));
45+
46+
return sprintf(buf, "%s\n", wiphy_name(wiphy));
4547
}
4648
static DEVICE_ATTR_RO(name);
4749

0 commit comments

Comments
 (0)