diff options
author | Joachim Fenkes <fenkes@de.ibm.com> | 2008-08-05 10:30:18 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2008-08-19 19:50:21 -0400 |
commit | 4589f1fe570c2c786b72eff146b2f168821882c6 (patch) | |
tree | 2f99262399ccce9ce1f5e0bb8f6b4d8e7d067699 /drivers/of | |
parent | 7230ced4925b07c259a62b515d8278c6bb1ad98c (diff) |
powerpc/ibmebus: Restore "name" sysfs attribute on ibmebus devices
Recent of_platform changes made of_bus_type_init() overwrite the bus
type's .dev_attrs list, meaning that the "name" attribute that ibmebus
devices previously had is no longer present. This is a user-visible
regression which breaks the userspace eHCA support, since the eHCA
userspace driver relies on the name attribute to check for valid
adapters.
This fixes it by providing the "name" attribute in the generic OF
device code instead. Tested on POWER.
Signed-off-by: Joachim Fenkes <fenkes@de.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'drivers/of')
-rw-r--r-- | drivers/of/device.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/of/device.c b/drivers/of/device.c index 8a1d93a2bb81..51e5214071da 100644 --- a/drivers/of/device.c +++ b/drivers/of/device.c | |||
@@ -57,6 +57,15 @@ static ssize_t devspec_show(struct device *dev, | |||
57 | return sprintf(buf, "%s\n", ofdev->node->full_name); | 57 | return sprintf(buf, "%s\n", ofdev->node->full_name); |
58 | } | 58 | } |
59 | 59 | ||
60 | static ssize_t name_show(struct device *dev, | ||
61 | struct device_attribute *attr, char *buf) | ||
62 | { | ||
63 | struct of_device *ofdev; | ||
64 | |||
65 | ofdev = to_of_device(dev); | ||
66 | return sprintf(buf, "%s\n", ofdev->node->name); | ||
67 | } | ||
68 | |||
60 | static ssize_t modalias_show(struct device *dev, | 69 | static ssize_t modalias_show(struct device *dev, |
61 | struct device_attribute *attr, char *buf) | 70 | struct device_attribute *attr, char *buf) |
62 | { | 71 | { |
@@ -71,6 +80,7 @@ static ssize_t modalias_show(struct device *dev, | |||
71 | 80 | ||
72 | struct device_attribute of_platform_device_attrs[] = { | 81 | struct device_attribute of_platform_device_attrs[] = { |
73 | __ATTR_RO(devspec), | 82 | __ATTR_RO(devspec), |
83 | __ATTR_RO(name), | ||
74 | __ATTR_RO(modalias), | 84 | __ATTR_RO(modalias), |
75 | __ATTR_NULL | 85 | __ATTR_NULL |
76 | }; | 86 | }; |