The following structure elements duplicate the information in
'struct device.of_node' and so are being eliminated. This patch
makes all readers of these elements use device.of_node instead.
(struct of_device *)->node
(struct dev_archdata *)->prom_node (sparc)
(struct dev_archdata *)->of_node (powerpc & microblaze)
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
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>
There is now a common function to generate the modalias string,
so use it. We just need to add the \n at the end.
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Currently the buf pointer is advanced too far during each iteration.
Also terminate the string with a newline.
Signed-off-by: Olaf Hering <olaf@aepfle.de>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Now that get_property() returns a void *, there's no need to cast its
return value. Also, treat the return value as const, so we can
constify get_property later.
powermac platform & macintosh driver changes.
Built for pmac32_defconfig, g5_defconfig
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Provide a "compatible" entry in /sys/bus/macio/devices/*/ This can be used
to load drivers via the modules.alias file.
Signed-off-by: Olaf Hering <olh@suse.de>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
This adds sysfs nodes that the hotplug userspace can use to load the
appropriate modules.
In order for hotplug to work with macio devices, patches to
module-init-tools and hotplug must be applied. Those patches are
available at:
ftp://ftp.suse.com/pub/people/jeffm/linux/macio-hotplug/
Changes: The previous versions were built on 2.6.12. 2.6.13-rcX introduced
a device_attribute parameter to the show functions. Since that
parameter was treated as the output buffer, memory corruption would
result, causing Oopsen very quickly.
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>