diff options
-rw-r--r-- | arch/powerpc/kernel/ibmebus.c | 12 | ||||
-rw-r--r-- | drivers/of/device.c | 10 |
2 files changed, 10 insertions, 12 deletions
diff --git a/arch/powerpc/kernel/ibmebus.c b/arch/powerpc/kernel/ibmebus.c index 9d42eb57aea3..a06362223f8d 100644 --- a/arch/powerpc/kernel/ibmebus.c +++ b/arch/powerpc/kernel/ibmebus.c | |||
@@ -233,17 +233,6 @@ void ibmebus_free_irq(u32 ist, void *dev_id) | |||
233 | } | 233 | } |
234 | EXPORT_SYMBOL(ibmebus_free_irq); | 234 | EXPORT_SYMBOL(ibmebus_free_irq); |
235 | 235 | ||
236 | static ssize_t name_show(struct device *dev, | ||
237 | struct device_attribute *attr, char *buf) | ||
238 | { | ||
239 | return sprintf(buf, "%s\n", to_of_device(dev)->node->name); | ||
240 | } | ||
241 | |||
242 | static struct device_attribute ibmebus_dev_attrs[] = { | ||
243 | __ATTR_RO(name), | ||
244 | __ATTR_NULL | ||
245 | }; | ||
246 | |||
247 | static char *ibmebus_chomp(const char *in, size_t count) | 236 | static char *ibmebus_chomp(const char *in, size_t count) |
248 | { | 237 | { |
249 | char *out = kmalloc(count + 1, GFP_KERNEL); | 238 | char *out = kmalloc(count + 1, GFP_KERNEL); |
@@ -327,7 +316,6 @@ static struct bus_attribute ibmebus_bus_attrs[] = { | |||
327 | 316 | ||
328 | struct bus_type ibmebus_bus_type = { | 317 | struct bus_type ibmebus_bus_type = { |
329 | .uevent = of_device_uevent, | 318 | .uevent = of_device_uevent, |
330 | .dev_attrs = ibmebus_dev_attrs, | ||
331 | .bus_attrs = ibmebus_bus_attrs | 319 | .bus_attrs = ibmebus_bus_attrs |
332 | }; | 320 | }; |
333 | EXPORT_SYMBOL(ibmebus_bus_type); | 321 | EXPORT_SYMBOL(ibmebus_bus_type); |
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 | }; |