mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-02 01:06:46 +09:00
spi: Fix device unregistration when unregistering the bus master
commit 178db7d30f 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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
cf11afd6eb
commit
32da4c5715
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user