Skip to content

Commit

Permalink
drivers/spi/spi.c: don't release the spi device twice
Browse files Browse the repository at this point in the history
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 2b9603a ("spi: enable
spi_board_info to be registered after spi_master").

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: David Lamparter <equinox@diac24.net>
Cc: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Sebastian Andrzej Siewior authored and Linus Torvalds committed Dec 23, 2010
1 parent 4be2c95 commit 97dbf37
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/spi/spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 97dbf37

Please sign in to comment.