2011/5/11 Rabin Vincent <rabin@xxxxxx>: > On Wed, May 11, 2011 at 03:49, Ben Dooks <ben-i2c@xxxxxxxxx> wrote: >> On Mon, May 09, 2011 at 11:37:57PM +0200, Linus Walleij wrote: >>> + /* >>> + * During system suspend, runtime suspend transitions are disabled. >>> + * This check and direct call are here so that even if some driver >>> + * performs i2c transactions in its suspend rountine, we would properly >>> + * runtime suspend the i2c driver. >>> + */ >>> + if (!pm_runtime_suspended(dev)) >>> + if (dev->bus && dev->bus->pm && dev->bus->pm->runtime_suspend) >>> + dev->bus->pm->runtime_suspend(dev); >>> + >> >> surely there must be better way of calling this? > > This is not needed and can be removed. > >> >>> + return 0; >>> +} >> >>> +static int nmk_i2c_resume(struct device *dev) >>> +{ >>> + if (!pm_runtime_suspended(dev)) >>> + if (dev->bus && dev->bus->pm && dev->bus->pm->runtime_resume) >>> + dev->bus->pm->runtime_resume(dev); >>> + >>> + return 0; >> >> ditto. > > This too. Cool, I'll cut it out of this patch and rebase the patch set. Yours, Linus Walleij -- To unsubscribe from this list: send the line "unsubscribe linux-i2c" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html