Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 73688
b: refs/heads/master
c: 350d007
h: refs/heads/master
v: v3
  • Loading branch information
Atsushi Nemoto authored and Linus Torvalds committed Nov 15, 2007
1 parent d68e689 commit e1984c5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: cbff2fbf55c21f50298b1aef1263b11bf510e35f
refs/heads/master: 350d0076c5763ca2b88ca05e3889bfa7c1905f21
8 changes: 5 additions & 3 deletions trunk/drivers/spi/spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -457,10 +457,11 @@ int spi_register_master(struct spi_master *master)
EXPORT_SYMBOL_GPL(spi_register_master);


static int __unregister(struct device *dev, void *unused)
static int __unregister(struct device *dev, void *master_dev)
{
/* note: before about 2.6.14-rc1 this would corrupt memory: */
spi_unregister_device(to_spi_device(dev));
if (dev != master_dev)
spi_unregister_device(to_spi_device(dev));
return 0;
}

Expand All @@ -478,7 +479,8 @@ void spi_unregister_master(struct spi_master *master)
{
int dummy;

dummy = device_for_each_child(master->dev.parent, NULL, __unregister);
dummy = device_for_each_child(master->dev.parent, &master->dev,
__unregister);
device_unregister(&master->dev);
}
EXPORT_SYMBOL_GPL(spi_unregister_master);
Expand Down

0 comments on commit e1984c5

Please sign in to comment.