diff options
author | Gabor Juhos <juhosg@openwrt.org> | 2012-01-11 09:14:14 +0000 |
---|---|---|
committer | Gabor Juhos <juhosg@openwrt.org> | 2012-01-11 09:14:14 +0000 |
commit | aeeb859e583314c862654564dae4142c17bc9c92 (patch) | |
tree | ea2c6a5864f47304ecc811ab024808087aaad095 /target/linux/ar71xx/files/drivers | |
parent | ad96a5a37b3e11096362a5f807b02e6c47ed7b0e (diff) | |
download | master-187ad058-aeeb859e583314c862654564dae4142c17bc9c92.tar.gz master-187ad058-aeeb859e583314c862654564dae4142c17bc9c92.tar.bz2 master-187ad058-aeeb859e583314c862654564dae4142c17bc9c92.zip |
ar71xx: ar71xx_spi: add shutdown handler
This allows to access the flash from a kexec'd kernel.
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@29707 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/ar71xx/files/drivers')
-rw-r--r-- | target/linux/ar71xx/files/drivers/spi/ar71xx_spi.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/target/linux/ar71xx/files/drivers/spi/ar71xx_spi.c b/target/linux/ar71xx/files/drivers/spi/ar71xx_spi.c index be356aafb1..d1ed731c14 100644 --- a/target/linux/ar71xx/files/drivers/spi/ar71xx_spi.c +++ b/target/linux/ar71xx/files/drivers/spi/ar71xx_spi.c @@ -243,9 +243,19 @@ static int ar71xx_spi_remove(struct platform_device *pdev) return 0; } +static void ar71xx_spi_shutdown(struct platform_device *pdev) +{ + int ret; + + ret = ar71xx_spi_remove(pdev); + if (ret) + dev_err(&pdev->dev, "shutdown failed with %d\n", ret); +} + static struct platform_driver ar71xx_spi_drv = { .probe = ar71xx_spi_probe, .remove = ar71xx_spi_remove, + .shutdown = ar71xx_spi_shutdown, .driver = { .name = DRV_NAME, .owner = THIS_MODULE, |