diff options
author | Olaf Hering <olaf@aepfle.de> | 2008-04-24 09:16:00 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2008-05-14 08:31:28 -0400 |
commit | 140b932f8cb6cced10b96860651a198b1b89cbb9 (patch) | |
tree | b515aa9982f7eaffd43b994497bff925b2a8b96b /drivers/of/platform.c | |
parent | 9d5f525b86453da921360727112161254accc8c1 (diff) |
[POWERPC] Create modalias file in sysfs for of_platform bus
Create /sys/bus/of_platform/devices/*/modalias file to allow autoloading
of modules. Modalias files are already present for many other bus types.
This adds also a newline to the devspec files.
Also create a devspec file for mac-io devices. They were created as a
side effect. Use correct buffer size for mac-io modalias buffer.
Tested on iBook1 and Efika.
Signed-off-by: Olaf Hering <olaf@aepfle.de>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'drivers/of/platform.c')
-rw-r--r-- | drivers/of/platform.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/of/platform.c b/drivers/of/platform.c index ca09a63a64db..298de0f95d70 100644 --- a/drivers/of/platform.c +++ b/drivers/of/platform.c | |||
@@ -17,6 +17,8 @@ | |||
17 | #include <linux/of_device.h> | 17 | #include <linux/of_device.h> |
18 | #include <linux/of_platform.h> | 18 | #include <linux/of_platform.h> |
19 | 19 | ||
20 | extern struct device_attribute of_platform_device_attrs[]; | ||
21 | |||
20 | static int of_platform_bus_match(struct device *dev, struct device_driver *drv) | 22 | static int of_platform_bus_match(struct device *dev, struct device_driver *drv) |
21 | { | 23 | { |
22 | struct of_device *of_dev = to_of_device(dev); | 24 | struct of_device *of_dev = to_of_device(dev); |
@@ -103,6 +105,7 @@ int of_bus_type_init(struct bus_type *bus, const char *name) | |||
103 | bus->suspend = of_platform_device_suspend; | 105 | bus->suspend = of_platform_device_suspend; |
104 | bus->resume = of_platform_device_resume; | 106 | bus->resume = of_platform_device_resume; |
105 | bus->shutdown = of_platform_device_shutdown; | 107 | bus->shutdown = of_platform_device_shutdown; |
108 | bus->dev_attrs = of_platform_device_attrs; | ||
106 | return bus_register(bus); | 109 | return bus_register(bus); |
107 | } | 110 | } |
108 | 111 | ||