From: juhosg Date: Wed, 11 Jan 2012 09:14:18 +0000 (+0000) Subject: ar71xx: pb44_spi: add shutdown handler X-Git-Url: http://git.rohieb.name/openwrt.git/commitdiff_plain/6734a832bcb72e9de334232505aa6930c7db8cb7?hp=7bb349bc59a592fb76d5635f0ee2c649ffc010fc 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 --- diff --git a/target/linux/ar71xx/files/drivers/spi/pb44_spi.c b/target/linux/ar71xx/files/drivers/spi/pb44_spi.c index 01b5f1cc2..556c7717c 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,