summaryrefslogtreecommitdiffstats
path: root/drivers/macintosh/macio_sysfs.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-07-16 13:11:29 +0200
committerIngo Molnar <mingo@elte.hu>2008-07-16 13:11:29 +0200
commit77e442461c74068217b59b356cf18992c78ed896 (patch)
tree70f62a16bc6a81b63768279c9b40645d8f4dd4ff /drivers/macintosh/macio_sysfs.c
parentd54191b85e294c46f05a2249b1f55ae54930bcc7 (diff)
parent45158894d4d6704afbb4cefe55e5f6ca279fe12a (diff)
downloadtalos-op-linux-77e442461c74068217b59b356cf18992c78ed896.tar.gz
talos-op-linux-77e442461c74068217b59b356cf18992c78ed896.zip
Merge branch 'linus' into x86/kprobes
Diffstat (limited to 'drivers/macintosh/macio_sysfs.c')
-rw-r--r--drivers/macintosh/macio_sysfs.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/macintosh/macio_sysfs.c b/drivers/macintosh/macio_sysfs.c
index 112e5ef728f1..9e9453b58425 100644
--- a/drivers/macintosh/macio_sysfs.c
+++ b/drivers/macintosh/macio_sysfs.c
@@ -44,7 +44,7 @@ static ssize_t modalias_show (struct device *dev, struct device_attribute *attr,
struct of_device *ofdev = to_of_device(dev);
int len;
- len = of_device_get_modalias(ofdev, buf, PAGE_SIZE);
+ len = of_device_get_modalias(ofdev, buf, PAGE_SIZE - 2);
buf[len] = '\n';
buf[len+1] = 0;
@@ -52,6 +52,15 @@ static ssize_t modalias_show (struct device *dev, struct device_attribute *attr,
return len+1;
}
+static ssize_t devspec_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->full_name);
+}
+
macio_config_of_attr (name, "%s\n");
macio_config_of_attr (type, "%s\n");
@@ -60,5 +69,6 @@ struct device_attribute macio_dev_attrs[] = {
__ATTR_RO(type),
__ATTR_RO(compatible),
__ATTR_RO(modalias),
+ __ATTR_RO(devspec),
__ATTR_NULL
};
OpenPOWER on IntegriCloud