summaryrefslogtreecommitdiff
path: root/target/linux/ar71xx/files/drivers
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2012-01-11 09:14:18 +0000
committerGabor Juhos <juhosg@openwrt.org>2012-01-11 09:14:18 +0000
commit88d8cdd5031a954fc67a4f8ef2661b4532aa4688 (patch)
tree2f068dc9877e1b0b3836dbce49d84211d46df431 /target/linux/ar71xx/files/drivers
parente1b7995aef83ef9b55d4a57a715de49e2c77f624 (diff)
downloadmtk-20170518-88d8cdd5031a954fc67a4f8ef2661b4532aa4688.zip
mtk-20170518-88d8cdd5031a954fc67a4f8ef2661b4532aa4688.tar.gz
mtk-20170518-88d8cdd5031a954fc67a4f8ef2661b4532aa4688.tar.bz2
ar71xx: pb44_spi: add shutdown handler
This allows to access the flash from a kexec'd kernel. SVN-Revision: 29710
Diffstat (limited to 'target/linux/ar71xx/files/drivers')
-rw-r--r--target/linux/ar71xx/files/drivers/spi/pb44_spi.c10
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 01b5f1c..556c771 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,