diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-08-20 11:44:33 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-08-20 11:44:33 -0400 |
commit | 8498ffd66774ce0e8550afc61a56b2cbeee77e9c (patch) | |
tree | 103e47282bff13fca727ead367f6cd95fa44c01f /drivers | |
parent | 75d95062185c60356a423f7ab9e975b4293ec4f3 (diff) | |
parent | cd5aeb9f6cf7ada6baa218e01b4299e201497cde (diff) |
Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc:
powerpc: Fix vio_bus_probe oops on probe error
powerpc/ibmebus: Restore "name" sysfs attribute on ibmebus devices
powerpc: Fix /dev/oldmem interface for kdump
powerpc/spufs: Remove invalid semicolon after if statement
powerpc/spufs: reference context while dropping state mutex in scheduler
powerpc/spufs: fix npc setting for NOSCHED contexts
Diffstat (limited to 'drivers')
-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 | }; |