diff options
author | Alexandre Belloni <alexandre.belloni@free-electrons.com> | 2017-06-02 07:57:03 -0400 |
---|---|---|
committer | Alexandre Belloni <alexandre.belloni@free-electrons.com> | 2017-06-03 04:52:04 -0400 |
commit | 77a73f3caece06d1d17268f43ec39c5779e6ce24 (patch) | |
tree | 692440664a8691ced1dfc821cbb58a8aea950380 | |
parent | a21512c1698d8106bcece0d24ff590dc92682678 (diff) |
rtc: sysfs: make name uniform
The name sysfs attribute is not useful in its current form because of all
the drivers:
- 3 are using the feature correctly
- 2 are clearly misusing it
- 60 are using driver.name, either directly or indirectly
- 46 are using pdev->name
- 8 are using client->name
- 31 are using a variation of driver.name (addition or removal of rtc-,
-rtc, _rtc, rtc_)
Make it uniform and use the driver name and the device name.
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
-rw-r--r-- | drivers/rtc/rtc-sysfs.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/rtc/rtc-sysfs.c b/drivers/rtc/rtc-sysfs.c index 1218d5d4224d..e364550eb9a7 100644 --- a/drivers/rtc/rtc-sysfs.c +++ b/drivers/rtc/rtc-sysfs.c | |||
@@ -27,7 +27,8 @@ | |||
27 | static ssize_t | 27 | static ssize_t |
28 | name_show(struct device *dev, struct device_attribute *attr, char *buf) | 28 | name_show(struct device *dev, struct device_attribute *attr, char *buf) |
29 | { | 29 | { |
30 | return sprintf(buf, "%s\n", to_rtc_device(dev)->name); | 30 | return sprintf(buf, "%s %s\n", dev_driver_string(dev->parent), |
31 | dev_name(dev->parent)); | ||
31 | } | 32 | } |
32 | static DEVICE_ATTR_RO(name); | 33 | static DEVICE_ATTR_RO(name); |
33 | 34 | ||