[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>
This commit is contained in:
Olaf Hering
2008-04-24 23:16:00 +10:00
committed by Paul Mackerras
parent 9d5f525b86
commit 140b932f8c
3 changed files with 34 additions and 17 deletions

View File

@@ -17,6 +17,8 @@
#include <linux/of_device.h>
#include <linux/of_platform.h>
extern struct device_attribute of_platform_device_attrs[];
static int of_platform_bus_match(struct device *dev, struct device_driver *drv)
{
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)
bus->suspend = of_platform_device_suspend;
bus->resume = of_platform_device_resume;
bus->shutdown = of_platform_device_shutdown;
bus->dev_attrs = of_platform_device_attrs;
return bus_register(bus);
}