spi: Fix device unregistration when unregistering the bus master
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Mon, 12 Dec 2011 00:15:06 +0000 (01:15 +0100)
committerBen Hutchings <ben@decadent.org.uk>
Fri, 11 May 2012 12:14:09 +0000 (13:14 +0100)
commit4cfa4199d07dfbb9ff3b0f84857a4c81c8b17cae
tree44490b6adb92dfc4eb17462ffe0aa8a03ebe9641
parente4a81003b038ab31ba745f8b93398f2016f55623
spi: Fix device unregistration when unregistering the bus master

commit 178db7d30f94707efca1a189753c105ef69942ed upstream.

Device are added as children of the bus master's parent device, but
spi_unregister_master() looks for devices to unregister in the bus
master's children. This results in the child devices not being
unregistered.

Fix this by registering devices as direct children of the bus master.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/spi/spi.c