diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2011-12-12 01:15:06 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-04-27 09:51:09 -0700 |
commit | 32da4c5715b4200423c1cb8edf2ae68ecca43ebe (patch) | |
tree | 77fdf327b607449edaf4e72874385fcbd0bb5027 | |
parent | cf11afd6eb852988bc19813acdc62365fac1499d (diff) | |
download | kernel_samsung_tuna-32da4c5715b4200423c1cb8edf2ae68ecca43ebe.zip kernel_samsung_tuna-32da4c5715b4200423c1cb8edf2ae68ecca43ebe.tar.gz kernel_samsung_tuna-32da4c5715b4200423c1cb8edf2ae68ecca43ebe.tar.bz2 |
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>
-rw-r--r-- | drivers/spi/spi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index 2e13a14..b423fe9 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c @@ -318,7 +318,7 @@ struct spi_device *spi_alloc_device(struct spi_master *master) } spi->master = master; - spi->dev.parent = dev; + spi->dev.parent = &master->dev; spi->dev.bus = &spi_bus_type; spi->dev.release = spidev_release; device_initialize(&spi->dev); |