From cce9b1a0ec87af2d8319dde5aeb697fb8c89f931 Mon Sep 17 00:00:00 2001 From: Robert Jarzmik Date: Tue, 22 Jul 2008 09:39:00 +0200 Subject: [PATCH] --- yaml --- r: 106446 b: refs/heads/master c: 7b2491911540e4904498622fbee2e1a9e3120d2f h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/mtd/maps/physmap.c | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index 548c46e01a44..3e6aff7c3227 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 998453fbf2e0709bf65ac419718ad284401b2b4f +refs/heads/master: 7b2491911540e4904498622fbee2e1a9e3120d2f diff --git a/trunk/drivers/mtd/maps/physmap.c b/trunk/drivers/mtd/maps/physmap.c index 1f6b9066b63e..7c8cdf49deb6 100644 --- a/trunk/drivers/mtd/maps/physmap.c +++ b/trunk/drivers/mtd/maps/physmap.c @@ -201,7 +201,8 @@ static int physmap_flash_suspend(struct platform_device *dev, pm_message_t state int i; for (i = 0; i < MAX_RESOURCES && info->mtd[i]; i++) - ret |= info->mtd[i]->suspend(info->mtd[i]); + if (info->mtd[i]->suspend) + ret |= info->mtd[i]->suspend(info->mtd[i]); return ret; } @@ -212,7 +213,8 @@ static int physmap_flash_resume(struct platform_device *dev) int i; for (i = 0; i < MAX_RESOURCES && info->mtd[i]; i++) - info->mtd[i]->resume(info->mtd[i]); + if (info->mtd[i]->resume) + info->mtd[i]->resume(info->mtd[i]); return 0; } @@ -223,8 +225,9 @@ 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]) == 0) - info->mtd[i]->resume(info->mtd[i]); + if (info->mtd[i]->suspend && info->mtd[i]->resume) + if (info->mtd[i]->suspend(info->mtd[i]) == 0) + info->mtd[i]->resume(info->mtd[i]); } #else #define physmap_flash_suspend NULL