]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commit
[POWERPC] ibmebus: dynamic addition/removal of adapters, some code cleanup
authorJoachim Fenkes <fenkes@de.ibm.com>
Fri, 9 Mar 2007 18:00:32 +0000 (19:00 +0100)
committerPaul Mackerras <paulus@samba.org>
Fri, 16 Mar 2007 05:38:19 +0000 (16:38 +1100)
commit6bccf755ff53241d46c01c229b3c2452b9029ec4
tree41ecb5e2a78120b95224c674dac0f57bbbff5e57
parenta83088003cd53f3cd8d550ab5d7778866568d204
[POWERPC] ibmebus: dynamic addition/removal of adapters, some code cleanup

This adds two sysfs attributes to /sys/bus/ibmebus which can be used to
notify the ebus driver of added / removed ebus devices in the OF device
tree.

Echoing the device's location code (as found in the OFDT "ibm,loc-code"
property) into the "probe" attribute will notify ebus of addition of the
device and cause the appropriate device driver's probe function to be called
on the device.

Likewise, echoing the location code into the "remove" attribute will cause
the device to be removed from the system.

The writes will block until the respective operation has finished and return
an error code if the operation failed.

In addition, two minor tidbits are fixed:

- The fake root device used to provide a common parent for all ebus devices
  is now based on device instead of of_device - it had no associated devtree
  node. This saves several checks throughout the ebus driver.

- The sysfs attributes are now generated automagically by device_register()
  instead of by the ibmebus code, which saves a few compiler warnings about
  unused return codes.

Signed-off-by: Joachim Fenkes <fenkes@de.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
arch/powerpc/kernel/ibmebus.c
include/asm-powerpc/ibmebus.h