+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