summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--target/linux/ar71xx/files/drivers/spi/ar71xx_spi.c10
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,