diff options
author | Robert Richter <robert.richter@amd.com> | 2010-10-11 19:26:50 +0200 |
---|---|---|
committer | Robert Richter <robert.richter@amd.com> | 2010-10-11 19:26:50 +0200 |
commit | ad0f7cfaa85fc033523a09ab1f3dd6b8ded3dff5 (patch) | |
tree | 2565121e4b9945d953e02c77a2e53065b3789aa4 /drivers/spi/spi.c | |
parent | 86c8c04792f152c5469023885510140dd34817bc (diff) | |
parent | c7a27aa4652c63172489a73f3961455650a79a7f (diff) |
Merge branch 'oprofile/urgent' (early part) into oprofile/perf
Diffstat (limited to 'drivers/spi/spi.c')
-rw-r--r-- | drivers/spi/spi.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index a9e5c79ae52..0bcf4c1601a 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c @@ -554,11 +554,9 @@ done: EXPORT_SYMBOL_GPL(spi_register_master); -static int __unregister(struct device *dev, void *master_dev) +static int __unregister(struct device *dev, void *null) { - /* note: before about 2.6.14-rc1 this would corrupt memory: */ - if (dev != master_dev) - spi_unregister_device(to_spi_device(dev)); + spi_unregister_device(to_spi_device(dev)); return 0; } @@ -576,8 +574,7 @@ void spi_unregister_master(struct spi_master *master) { int dummy; - 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); |