diff options
author | Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | 2011-12-30 10:15:59 -0500 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2012-01-09 13:26:23 -0500 |
commit | 079c985e7a6f4ce60f931cebfdd5ee3c38347e31 (patch) | |
tree | b4db3f6e38409eeaa8daff4c17b8f642d0939177 /drivers/mtd/maps | |
parent | 381345652fca688aeaa967c231e5075cf68d05b6 (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')
-rw-r--r-- | drivers/mtd/maps/physmap.c | 5 | ||||
-rw-r--r-- | drivers/mtd/maps/rbtx4939-flash.c | 5 |
2 files changed, 4 insertions, 6 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) | |||
190 | int i; | 190 | int i; |
191 | 191 | ||
192 | for (i = 0; i < MAX_RESOURCES && info->mtd[i]; i++) | 192 | for (i = 0; i < MAX_RESOURCES && info->mtd[i]; i++) |
193 | if (info->mtd[i]->suspend && info->mtd[i]->resume) | 193 | if (mtd_suspend(info->mtd[i]) == 0) |
194 | if (mtd_suspend(info->mtd[i]) == 0) | 194 | mtd_resume(info->mtd[i]); |
195 | mtd_resume(info->mtd[i]); | ||
196 | } | 195 | } |
197 | #else | 196 | #else |
198 | #define physmap_flash_shutdown NULL | 197 | #define physmap_flash_shutdown NULL |
diff --git a/drivers/mtd/maps/rbtx4939-flash.c b/drivers/mtd/maps/rbtx4939-flash.c index 717628312040..3da63fc6f16e 100644 --- a/drivers/mtd/maps/rbtx4939-flash.c +++ b/drivers/mtd/maps/rbtx4939-flash.c | |||
@@ -119,9 +119,8 @@ static void rbtx4939_flash_shutdown(struct platform_device *dev) | |||
119 | { | 119 | { |
120 | struct rbtx4939_flash_info *info = platform_get_drvdata(dev); | 120 | struct rbtx4939_flash_info *info = platform_get_drvdata(dev); |
121 | 121 | ||
122 | if (info->mtd->suspend && info->mtd->resume) | 122 | if (mtd_suspend(info->mtd) == 0) |
123 | if (mtd_suspend(info->mtd) == 0) | 123 | mtd_resume(info->mtd); |
124 | mtd_resume(info->mtd); | ||
125 | } | 124 | } |
126 | #else | 125 | #else |
127 | #define rbtx4939_flash_shutdown NULL | 126 | #define rbtx4939_flash_shutdown NULL |