Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 87908
b: refs/heads/master
c: 4a5691c
h: refs/heads/master
v: v3
  • Loading branch information
Anton Vorontsov authored and Linus Torvalds committed Mar 28, 2008
1 parent 2d1a90a commit 629486a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3f1e9070f63b0eecadfa059959bf7c9dbe835962
refs/heads/master: 4a5691c0f7b65b7aa9d237e55f05e691352caac7
15 changes: 7 additions & 8 deletions trunk/drivers/mtd/maps/physmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -202,9 +202,8 @@ static int physmap_flash_suspend(struct platform_device *dev, pm_message_t state
int ret = 0;
int i;

if (info)
for (i = 0; i < MAX_RESOURCES; i++)
ret |= info->mtd[i]->suspend(info->mtd[i]);
for (i = 0; i < MAX_RESOURCES && info->mtd[i]; i++)
ret |= info->mtd[i]->suspend(info->mtd[i]);

return ret;
}
Expand All @@ -214,9 +213,9 @@ static int physmap_flash_resume(struct platform_device *dev)
struct physmap_flash_info *info = platform_get_drvdata(dev);
int i;

if (info)
for (i = 0; i < MAX_RESOURCES; i++)
info->mtd[i]->resume(info->mtd[i]);
for (i = 0; i < MAX_RESOURCES && info->mtd[i]; i++)
info->mtd[i]->resume(info->mtd[i]);

return 0;
}

Expand All @@ -225,8 +224,8 @@ static void physmap_flash_shutdown(struct platform_device *dev)
struct physmap_flash_info *info = platform_get_drvdata(dev);
int i;

for (i = 0; i < MAX_RESOURCES; i++)
if (info && info->mtd[i]->suspend(info->mtd[i]) == 0)
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]);
}
#else
Expand Down

0 comments on commit 629486a

Please sign in to comment.