]> git.karo-electronics.de Git - karo-tx-linux.git/commit
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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 27 Apr 2012 16:51:09 +0000 (09:51 -0700)
commit32da4c5715b4200423c1cb8edf2ae68ecca43ebe
tree77fdf327b607449edaf4e72874385fcbd0bb5027
parentcf11afd6eb852988bc19813acdc62365fac1499d
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>
Cc: Takahiro AKASHI <akashi@jp.fujitsu.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/spi/spi.c