aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/maps/sa1100-flash.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mtd/maps/sa1100-flash.c')
-rw-r--r--drivers/mtd/maps/sa1100-flash.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/mtd/maps/sa1100-flash.c b/drivers/mtd/maps/sa1100-flash.c
index acf01ef9b575..c81bec7b14d5 100644
--- a/drivers/mtd/maps/sa1100-flash.c
+++ b/drivers/mtd/maps/sa1100-flash.c
@@ -440,9 +440,17 @@ static int sa1100_mtd_resume(struct device *dev)
440 info->mtd->resume(info->mtd); 440 info->mtd->resume(info->mtd);
441 return 0; 441 return 0;
442} 442}
443
444static void sa1100_mtd_shutdown(struct device *dev)
445{
446 struct sa_info *info = dev_get_drvdata(dev);
447 if (info && info->mtd->suspend(info->mtd) == 0)
448 info->mtd->resume(info->mtd);
449}
443#else 450#else
444#define sa1100_mtd_suspend NULL 451#define sa1100_mtd_suspend NULL
445#define sa1100_mtd_resume NULL 452#define sa1100_mtd_resume NULL
453#define sa1100_mtd_shutdown NULL
446#endif 454#endif
447 455
448static struct device_driver sa1100_mtd_driver = { 456static struct device_driver sa1100_mtd_driver = {
@@ -452,6 +460,7 @@ static struct device_driver sa1100_mtd_driver = {
452 .remove = __exit_p(sa1100_mtd_remove), 460 .remove = __exit_p(sa1100_mtd_remove),
453 .suspend = sa1100_mtd_suspend, 461 .suspend = sa1100_mtd_suspend,
454 .resume = sa1100_mtd_resume, 462 .resume = sa1100_mtd_resume,
463 .shutdown = sa1100_mtd_shutdown,
455}; 464};
456 465
457static int __init sa1100_mtd_init(void) 466static int __init sa1100_mtd_init(void)