aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/maps
diff options
context:
space:
mode:
authorakpm@linux-foundation.org <akpm@linux-foundation.org>2008-02-03 15:56:03 -0500
committerDavid Woodhouse <dwmw2@infradead.org>2008-02-07 05:33:40 -0500
commitd5476689afd48e71395602698409e9f48cbba413 (patch)
tree2808a4825fee6b1f60d921b623baeee05c983165 /drivers/mtd/maps
parent6c77fd649fab4bea1b44cb534381a22e37650bc3 (diff)
[MTD] Fix maps/physmap.c compilation with CONFIG_PM
Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Diffstat (limited to 'drivers/mtd/maps')
-rw-r--r--drivers/mtd/maps/physmap.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/mtd/maps/physmap.c b/drivers/mtd/maps/physmap.c
index 5a83ae7e14f9..f00e04efbe28 100644
--- a/drivers/mtd/maps/physmap.c
+++ b/drivers/mtd/maps/physmap.c
@@ -204,7 +204,7 @@ static int physmap_flash_suspend(struct platform_device *dev, pm_message_t state
204 204
205 if (info) 205 if (info)
206 for (i = 0; i < MAX_RESOURCES; i++) 206 for (i = 0; i < MAX_RESOURCES; i++)
207 ret |= info->mtd[i].suspend(info->mtd[i]); 207 ret |= info->mtd[i]->suspend(info->mtd[i]);
208 208
209 return ret; 209 return ret;
210} 210}
@@ -216,7 +216,7 @@ static int physmap_flash_resume(struct platform_device *dev)
216 216
217 if (info) 217 if (info)
218 for (i = 0; i < MAX_RESOURCES; i++) 218 for (i = 0; i < MAX_RESOURCES; i++)
219 info->mtd[i].resume(info->mtd[i]); 219 info->mtd[i]->resume(info->mtd[i]);
220 return 0; 220 return 0;
221} 221}
222 222
@@ -226,19 +226,21 @@ static void physmap_flash_shutdown(struct platform_device *dev)
226 int i; 226 int i;
227 227
228 for (i = 0; i < MAX_RESOURCES; i++) 228 for (i = 0; i < MAX_RESOURCES; i++)
229 if (info && info->mtd[i].suspend(info->mtd[i]) == 0) 229 if (info && info->mtd[i]->suspend(info->mtd[i]) == 0)
230 info->mtd[i].resume(info->mtd[i]); 230 info->mtd[i]->resume(info->mtd[i]);
231} 231}
232#else
233#define physmap_flash_suspend NULL
234#define physmap_flash_resume NULL
235#define physmap_flash_shutdown NULL
232#endif 236#endif
233 237
234static struct platform_driver physmap_flash_driver = { 238static struct platform_driver physmap_flash_driver = {
235 .probe = physmap_flash_probe, 239 .probe = physmap_flash_probe,
236 .remove = physmap_flash_remove, 240 .remove = physmap_flash_remove,
237#ifdef CONFIG_PM
238 .suspend = physmap_flash_suspend, 241 .suspend = physmap_flash_suspend,
239 .resume = physmap_flash_resume, 242 .resume = physmap_flash_resume,
240 .shutdown = physmap_flash_shutdown, 243 .shutdown = physmap_flash_shutdown,
241#endif
242 .driver = { 244 .driver = {
243 .name = "physmap-flash", 245 .name = "physmap-flash",
244 }, 246 },