[v2] spi/spi: don't release the spi device twice
diff mbox

Message ID 20101123145910.GA23880@www.tglx.de
State Superseded, archived
Headers show

Commit Message

Sebastian Andrzej Siewior Nov. 23, 2010, 2:59 p.m. UTC
None

Patch
diff mbox

diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
index 709c836..b02d0cb 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);