X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fof%2Fdevice.c;h=51e5214071da9f32b370c48622d70f9a62f55e5b;hb=93fbaae188fba7c2a6e458f62e1f61439caebfc8;hp=8a1d93a2bb815c380bb18710369912834c2d2f06;hpb=af7a535688a758d15f06a98833e6a143b29af9de;p=linux-2.6-omap-h63xx.git diff --git a/drivers/of/device.c b/drivers/of/device.c index 8a1d93a2bb8..51e5214071d 100644 --- a/drivers/of/device.c +++ b/drivers/of/device.c @@ -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 };