diff options
author | Gabor Juhos <juhosg@openwrt.org> | 2012-01-11 09:14:18 +0000 |
---|---|---|
committer | Gabor Juhos <juhosg@openwrt.org> | 2012-01-11 09:14:18 +0000 |
commit | c7cf50257ff39ac82d445ab96e8ada426567e075 (patch) | |
tree | cf41a6aef8cb8219b1d46ca0a94ad683e5bf4129 /target/linux/ar71xx/files | |
parent | d4f8c16d013cbe356d9249039d81abfe31b19753 (diff) | |
download | upstream-c7cf50257ff39ac82d445ab96e8ada426567e075.tar.gz upstream-c7cf50257ff39ac82d445ab96e8ada426567e075.tar.bz2 upstream-c7cf50257ff39ac82d445ab96e8ada426567e075.zip |
ar71xx: pb44_spi: add shutdown handler
This allows to access the flash from a kexec'd kernel.
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@29710 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/ar71xx/files')
-rw-r--r-- | target/linux/ar71xx/files/drivers/spi/pb44_spi.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/target/linux/ar71xx/files/drivers/spi/pb44_spi.c b/target/linux/ar71xx/files/drivers/spi/pb44_spi.c index 01b5f1cc28..556c7717c8 100644 --- a/target/linux/ar71xx/files/drivers/spi/pb44_spi.c +++ b/target/linux/ar71xx/files/drivers/spi/pb44_spi.c @@ -278,9 +278,19 @@ static int pb44_spi_remove(struct platform_device *pdev) return 0; } +static void pb44_spi_shutdown(struct platform_device *pdev) +{ + int ret; + + ret = pb44_spi_remove(pdev); + if (ret) + dev_err(&pdev->dev, "shutdown failed with %d\n", ret); +} + static struct platform_driver pb44_spi_drv = { .probe = pb44_spi_probe, .remove = pb44_spi_remove, + .shutdown = pb44_spi_shutdown, .driver = { .name = DRV_NAME, .owner = THIS_MODULE, |