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 | 0f566a376c21d24050a57270dafcb0ddadda8b02 (patch) | |
tree | 676ecdd0d3c8655168379f2ed0c72fbb06b629d1 /target/linux | |
parent | 09a6e3f66213c835247197e703d58f964d20c8b7 (diff) | |
download | mtk-20170518-0f566a376c21d24050a57270dafcb0ddadda8b02.zip mtk-20170518-0f566a376c21d24050a57270dafcb0ddadda8b02.tar.gz mtk-20170518-0f566a376c21d24050a57270dafcb0ddadda8b02.tar.bz2 |
ar71xx: ar71xx_spi: add shutdown handler
This allows to access the flash from a kexec'd kernel.
SVN-Revision: 29707
Diffstat (limited to 'target/linux')
-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 be356aa..d1ed731 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, |