dect
/
linux-2.6
Archived
13
0
Fork 0

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>
This commit is contained in:
Laurent Pinchart 2011-12-12 01:15:06 +01:00 committed by Grant Likely
parent dc47ce90c3
commit 178db7d30f
1 changed files with 1 additions and 1 deletions

View File

@ -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);