ar71xx: pb44_spi: add shutdown handler
This allows to access the flash from a kexec'd kernel. SVN-Revision: 29710
This commit is contained in:
parent
e1b7995aef
commit
88d8cdd503
1 changed files with 10 additions and 0 deletions
|
@ -278,9 +278,19 @@ static int pb44_spi_remove(struct platform_device *pdev)
|
||||||
return 0;
|
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 = {
|
static struct platform_driver pb44_spi_drv = {
|
||||||
.probe = pb44_spi_probe,
|
.probe = pb44_spi_probe,
|
||||||
.remove = pb44_spi_remove,
|
.remove = pb44_spi_remove,
|
||||||
|
.shutdown = pb44_spi_shutdown,
|
||||||
.driver = {
|
.driver = {
|
||||||
.name = DRV_NAME,
|
.name = DRV_NAME,
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
|
|
Loading…
Reference in a new issue