diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2011-12-12 01:15:06 +0100 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2011-12-13 16:45:35 -0700 |
commit | 178db7d30f94707efca1a189753c105ef69942ed (patch) | |
tree | 088865bdd59288f626984e4191b636cabec8c439 /drivers | |
parent | dc47ce90c3a822cd7c9e9339fe4d5f61dcb26b50 (diff) | |
download | linux-178db7d30f94707efca1a189753c105ef69942ed.tar.bz2 |
spi: Fix device unregistration when unregistering the bus master
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>
Diffstat (limited to 'drivers')
-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 77eae99af11c..b2ccdea30cb9 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c @@ -319,7 +319,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); |