diff options
author | Grant Likely <grant.likely@secretlab.ca> | 2010-06-08 09:48:13 -0400 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2010-07-05 18:14:28 -0400 |
commit | 34a1c1e8c700f7cd849deb21193718a172722f8d (patch) | |
tree | 8cb17243ca49acda328f3561d55b6d3d2f62f0d2 /drivers/macintosh/macio_sysfs.c | |
parent | dd27dcda37f0b1a3b674760fb411abc5c8fe309c (diff) |
of: Modify of_device_get_modalias to be passed struct device
Now that the of_node pointer is part of struct device,
of_device_get_modalias could be used on any struct device
that has the device node pointer set. This patch changes
of_device_get_modalias to accept a struct device instead
of a struct of_device.
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
CC: Michal Simek <monstr@monstr.eu>
CC: Benjamin Herrenschmidt <benh@kernel.crashing.org>
CC: Wolfram Sang <w.sang@pengutronix.de>
CC: Stephen Rothwell <sfr@canb.auug.org.au>
CC: microblaze-uclinux@itee.uq.edu.au
CC: linuxppc-dev@ozlabs.org
Diffstat (limited to 'drivers/macintosh/macio_sysfs.c')
-rw-r--r-- | drivers/macintosh/macio_sysfs.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/macintosh/macio_sysfs.c b/drivers/macintosh/macio_sysfs.c index 6999ce59fd10..6024038a5b9d 100644 --- a/drivers/macintosh/macio_sysfs.c +++ b/drivers/macintosh/macio_sysfs.c | |||
@@ -41,10 +41,7 @@ compatible_show (struct device *dev, struct device_attribute *attr, char *buf) | |||
41 | static ssize_t modalias_show (struct device *dev, struct device_attribute *attr, | 41 | static ssize_t modalias_show (struct device *dev, struct device_attribute *attr, |
42 | char *buf) | 42 | char *buf) |
43 | { | 43 | { |
44 | struct of_device *ofdev = to_of_device(dev); | 44 | int len = of_device_get_modalias(dev, buf, PAGE_SIZE - 2); |
45 | int len; | ||
46 | |||
47 | len = of_device_get_modalias(ofdev, buf, PAGE_SIZE - 2); | ||
48 | 45 | ||
49 | buf[len] = '\n'; | 46 | buf[len] = '\n'; |
50 | buf[len+1] = 0; | 47 | buf[len+1] = 0; |