PM for physmap.c ?

Lennert Buytenhek buytenh at wantstofly.org
Wed Aug 30 10:04:21 EDT 2006


On Wed, Aug 23, 2006 at 05:07:27PM +0200, Steven Scholz wrote:

> Hi all,

Hello,


> for quite some time physmap.c uses platform_{device,driver}.
> 
> I wonder why it does not contain any (generic) code for power management
> yet, i.e. .suspend/.resume functions.
> 
> Is it correct that all I would need to survive a suspend/resume cycle is
> something like
> 
> int physmap_flash_suspend(struct platform_device *dev, pm_message_t state)
> {
> 	struct sa_info *info = platform_get_drvdata(dev);
> 	int ret = 0;
> 	if (info)
> 		ret = info->mtd->suspend(info->mtd);
> 	return ret;
> }
> 
> int physmap_flash_resume(struct platform_device *dev)
> {
> 	struct sa_info *info = platform_get_drvdata(dev);
> 	if (info)
> 		info->mtd->resume(info->mtd);
> 	return 0;
> }
> 
> as stolen from sa1100-flash.c?

Looks OK to me, but that doesn't say much.


cheers,
Lennert




More information about the linux-mtd mailing list