From: Sebastian Andrzej Siewior Date: Wed, 22 Dec 2010 01:24:31 +0000 (-0800) Subject: drivers/spi/spi.c: don't release the spi device twice X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=97dbf37d89b6d387a5fe79ffe3b72c37ec12db43;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git drivers/spi/spi.c: don't release the spi device twice This was fixed by David Lamparter in v2.6.36-rc5 3486008 ("spi: free children in spi_unregister_master, not siblings") and broken again in v2.6.37-rc1~2^2~4 during the merge of 2b9603a0 ("spi: enable spi_board_info to be registered after spi_master"). Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: David Lamparter Cc: Grant Likely Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index 709c836607de..b02d0cbce890 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c @@ -584,8 +584,7 @@ void spi_unregister_master(struct spi_master *master) list_del(&master->list); mutex_unlock(&board_lock); - dummy = device_for_each_child(master->dev.parent, &master->dev, - __unregister); + dummy = device_for_each_child(&master->dev, NULL, __unregister); device_unregister(&master->dev); } EXPORT_SYMBOL_GPL(spi_unregister_master);