Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 34143
b: refs/heads/master
c: 17c2dae
h: refs/heads/master
i:
  34141: f804920
  34139: 07c2e7d
  34135: b979978
  34127: 3a4a61b
  34111: d85ee9d
v: v3
  • Loading branch information
Lennert Buytenhek authored and David Woodhouse committed Sep 22, 2006
1 parent 1d61d03 commit 6399953
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 25f0c659fe64832d8ee06aa623fffaad708dcf8b
refs/heads/master: 17c2dae3aaff9b1e5d83996a5f098ad693f3aeca
33 changes: 33 additions & 0 deletions trunk/drivers/mtd/maps/physmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,42 @@ static int physmap_flash_probe(struct platform_device *dev)
return err;
}

#ifdef CONFIG_PM
static int physmap_flash_suspend(struct platform_device *dev, pm_message_t state)
{
struct physmap_flash_info *info = platform_get_drvdata(dev);
int ret = 0;

if (info)
ret = info->mtd->suspend(info->mtd);

return ret;
}

static int physmap_flash_resume(struct platform_device *dev)
{
struct physmap_flash_info *info = platform_get_drvdata(dev);
if (info)
info->mtd->resume(info->mtd);
return 0;
}

static void physmap_flash_shutdown(struct platform_device *dev)
{
struct physmap_flash_info *info = platform_get_drvdata(dev);
if (info && info->mtd->suspend(info->mtd) == 0)
info->mtd->resume(info->mtd);
}
#endif

static struct platform_driver physmap_flash_driver = {
.probe = physmap_flash_probe,
.remove = physmap_flash_remove,
#ifdef CONFIG_PM
.suspend = physmap_flash_suspend,
.resume = physmap_flash_resume,
.shutdown = physmap_flash_shutdown,
#endif
.driver = {
.name = "physmap-flash",
},
Expand Down

0 comments on commit 6399953

Please sign in to comment.