[Meego-kernel] [PATCH 3/5] i2c-mrst: add delay suspend support
bin.yang at intel.com
Wed Nov 24 20:52:19 PST 2010
I check all patches on git://gitorious.org/meego-os-base/kernel-source.git, but I don't find pm_runtime_set_autosuspend_delay definition in these patches.
For the un-needed initialisers, I had reworked it and re-submit the patches.
I am very sorry that my old patches have space tailing. I remove them in my new patches.
From: Arjan van de Ven [mailto:arjan at linux.intel.com]
Sent: Wednesday, November 24, 2010 10:33 PM
To: Alan Cox
Cc: Yang, Bin; meego-kernel at meego.com
Subject: Re: [Meego-kernel] [PATCH 3/5] i2c-mrst: add delay suspend support
>> +static int mrst_i2c_runtime_idle(struct device *dev)
>> + int err = 0;
>> + err = pm_schedule_suspend(dev, 500);
> Please don't stick in un-needed initialisers (err = 0). These will hide
> any real errors later on, and gcc is usually very good at finding them
> if this is not done.
>> + if(err != 0)
>> + return 0;
>> + return -EBUSY;
> otherwise looks good and seems a good idea. Ported to the upstream
> driver version and I'll send them to the maintainer shortly.
actually this is wrong for the upstream driver version.
upstream has core logic to just always do such delay by just setting one
see pm_runtime_set_autosuspend_delay() and co.
More information about the MeeGo-kernel