mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-24 02:18:54 +00:00
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>
This commit is contained in:
parent
a21512c169
commit
77a73f3cae
@ -27,7 +27,8 @@
|
||||
static ssize_t
|
||||
name_show(struct device *dev, struct device_attribute *attr, char *buf)
|
||||
{
|
||||
return sprintf(buf, "%s\n", to_rtc_device(dev)->name);
|
||||
return sprintf(buf, "%s %s\n", dev_driver_string(dev->parent),
|
||||
dev_name(dev->parent));
|
||||
}
|
||||
static DEVICE_ATTR_RO(name);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user