Hi Arjan,
        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. 

Thanks,
Bin

-----Original Message-----
From: Arjan van de Ven [mailto:[email protected]] 
Sent: Wednesday, November 24, 2010 10:33 PM
To: Alan Cox
Cc: Yang, Bin; [email protected]
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 
thing up....

see pm_runtime_set_autosuspend_delay() and co.

_______________________________________________
MeeGo-kernel mailing list
[email protected]
http://lists.meego.com/listinfo/meego-kernel

Reply via email to