diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-09-13 15:45:50 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-09-13 15:45:50 -0400 |
| commit | 6142811a3395188bac6fa4f5c4223471b1ac98a8 (patch) | |
| tree | 76fa1cfd80eddfc7e529683685baebfd54f4096b /drivers/spi/spi.c | |
| parent | 49553c2ef88749dd502687f4eb9c258bb10a4f44 (diff) | |
| parent | 25c8e03bdb769dfe2381f8b7942f05b0eb4bdf31 (diff) | |
Merge branch 'next-spi' of git://git.secretlab.ca/git/linux-2.6
* 'next-spi' of git://git.secretlab.ca/git/linux-2.6:
spi/pl022: move probe call to subsys_initcall()
powerpc/5200: mpc52xx_uart.c: Add of_node_put to avoid memory leak
spi/pl022: fix APB pclk power regression on U300
spi/spi_s3c64xx: Warn if PIO transfers time out
spi/s3c64xx: Fix incorrect reuse of 'val' local variable.
spi/s3c64xx: Fix compilation warning
spi/dw_spi: clean the cs_control code
spi/dw_spi: Allow interrupt sharing
spi/spi_s3c64xx: Increase dead reckoning time in wait_for_xfer()
spi/spi_s3c64xx: Move to subsys_initcall()
spi: free children in spi_unregister_master, not siblings
gpiolib: Add 'struct gpio_chip' forward declaration for !GPIOLIB case
of: Fix missing includes - ll_temac
spi/spi_s3c64xx: Staticise non-exported functions
spi/spi_s3c64xx: Make probe more robust against missing board config
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 a9e5c79ae52a..0bcf4c1601a2 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c | |||
| @@ -554,11 +554,9 @@ done: | |||
| 554 | EXPORT_SYMBOL_GPL(spi_register_master); | 554 | EXPORT_SYMBOL_GPL(spi_register_master); |
| 555 | 555 | ||
| 556 | 556 | ||
| 557 | static int __unregister(struct device *dev, void *master_dev) | 557 | static int __unregister(struct device *dev, void *null) |
| 558 | { | 558 | { |
| 559 | /* note: before about 2.6.14-rc1 this would corrupt memory: */ | 559 | spi_unregister_device(to_spi_device(dev)); |
| 560 | if (dev != master_dev) | ||
| 561 | spi_unregister_device(to_spi_device(dev)); | ||
| 562 | return 0; | 560 | return 0; |
| 563 | } | 561 | } |
| 564 | 562 | ||
| @@ -576,8 +574,7 @@ void spi_unregister_master(struct spi_master *master) | |||
| 576 | { | 574 | { |
| 577 | int dummy; | 575 | int dummy; |
| 578 | 576 | ||
| 579 | dummy = device_for_each_child(master->dev.parent, &master->dev, | 577 | dummy = device_for_each_child(&master->dev, NULL, __unregister); |
| 580 | __unregister); | ||
| 581 | device_unregister(&master->dev); | 578 | device_unregister(&master->dev); |
| 582 | } | 579 | } |
| 583 | EXPORT_SYMBOL_GPL(spi_unregister_master); | 580 | EXPORT_SYMBOL_GPL(spi_unregister_master); |
