summaryrefslogtreecommitdiff
path: root/drivers/mtd/maps/physmap.c
diff options
context:
space:
mode:
authorArtem Bityutskiy <artem.bityutskiy@linux.intel.com>2011-12-30 17:15:59 +0200
committerDavid Woodhouse <David.Woodhouse@intel.com>2012-01-09 18:26:23 +0000
commit079c985e7a6f4ce60f931cebfdd5ee3c38347e31 (patch)
treeb4db3f6e38409eeaa8daff4c17b8f642d0939177 /drivers/mtd/maps/physmap.c
parent381345652fca688aeaa967c231e5075cf68d05b6 (diff)
mtd: do not use mtd->suspend and mtd->resume directly
Just call the 'mtd_suspend()' and 'mtd_resume()' - they will do nothing if the operation is not defined. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/mtd/maps/physmap.c')
-rw-r--r--drivers/mtd/maps/physmap.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/mtd/maps/physmap.c b/drivers/mtd/maps/physmap.c
index d94cc62186c1..abc562653b31 100644
--- a/drivers/mtd/maps/physmap.c
+++ b/drivers/mtd/maps/physmap.c
@@ -190,9 +190,8 @@ static void physmap_flash_shutdown(struct platform_device *dev)
int i;
for (i = 0; i < MAX_RESOURCES && info->mtd[i]; i++)
- if (info->mtd[i]->suspend && info->mtd[i]->resume)
- if (mtd_suspend(info->mtd[i]) == 0)
- mtd_resume(info->mtd[i]);
+ if (mtd_suspend(info->mtd[i]) == 0)
+ mtd_resume(info->mtd[i]);
}
#else
#define physmap_flash_shutdown NULL