]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/of/device.c
Fix compile warning in kernel/params.c
[linux-2.6-omap-h63xx.git] / drivers / of / device.c
index 8a1d93a2bb815c380bb18710369912834c2d2f06..51e5214071da9f32b370c48622d70f9a62f55e5b 100644 (file)
@@ -57,6 +57,15 @@ static ssize_t devspec_show(struct device *dev,
        return sprintf(buf, "%s\n", ofdev->node->full_name);
 }
 
+static ssize_t name_show(struct device *dev,
+                               struct device_attribute *attr, char *buf)
+{
+       struct of_device *ofdev;
+
+       ofdev = to_of_device(dev);
+       return sprintf(buf, "%s\n", ofdev->node->name);
+}
+
 static ssize_t modalias_show(struct device *dev,
                                struct device_attribute *attr, char *buf)
 {
@@ -71,6 +80,7 @@ static ssize_t modalias_show(struct device *dev,
 
 struct device_attribute of_platform_device_attrs[] = {
        __ATTR_RO(devspec),
+       __ATTR_RO(name),
        __ATTR_RO(modalias),
        __ATTR_NULL
 };