aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/of/device.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/of/device.c')
-rw-r--r--drivers/of/device.c34
1 files changed, 0 insertions, 34 deletions
diff --git a/drivers/of/device.c b/drivers/of/device.c
index 45d86530799f..62b4b32ac887 100644
--- a/drivers/of/device.c
+++ b/drivers/of/device.c
@@ -47,40 +47,6 @@ void of_dev_put(struct platform_device *dev)
47} 47}
48EXPORT_SYMBOL(of_dev_put); 48EXPORT_SYMBOL(of_dev_put);
49 49
50static ssize_t devspec_show(struct device *dev,
51 struct device_attribute *attr, char *buf)
52{
53 struct platform_device *ofdev;
54
55 ofdev = to_platform_device(dev);
56 return sprintf(buf, "%s\n", ofdev->dev.of_node->full_name);
57}
58
59static ssize_t name_show(struct device *dev,
60 struct device_attribute *attr, char *buf)
61{
62 struct platform_device *ofdev;
63
64 ofdev = to_platform_device(dev);
65 return sprintf(buf, "%s\n", ofdev->dev.of_node->name);
66}
67
68static ssize_t modalias_show(struct device *dev,
69 struct device_attribute *attr, char *buf)
70{
71 ssize_t len = of_device_get_modalias(dev, buf, PAGE_SIZE - 2);
72 buf[len] = '\n';
73 buf[len+1] = 0;
74 return len+1;
75}
76
77struct device_attribute of_platform_device_attrs[] = {
78 __ATTR_RO(devspec),
79 __ATTR_RO(name),
80 __ATTR_RO(modalias),
81 __ATTR_NULL
82};
83
84int of_device_add(struct platform_device *ofdev) 50int of_device_add(struct platform_device *ofdev)
85{ 51{
86 BUG_ON(ofdev->dev.of_node == NULL); 52 BUG_ON(ofdev->dev.of_node == NULL);