diff mbox

[REPOST,v2] spi/spi: don't release the spi device twice

Message ID 20101220171330.GA15344@www.tglx.de (mailing list archive)
State Superseded, archived
Headers show

Commit Message

Sebastian Andrzej Siewior Dec. 20, 2010, 5:13 p.m. UTC
None
diff mbox

Patch

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