Re: [PATCH 2/2] i2c: Factor out runtime suspend checks from PM operations

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Dec 20, 2010 at 8:03 PM, Mark Brown
<broonie@xxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
>  static int i2c_device_pm_restore(struct device *dev)
> @@ -267,7 +248,7 @@ static int i2c_device_pm_restore(struct device *dev)
>        int ret;
>
>        if (pm)
> -               ret = pm->restore ? pm->restore(dev) : 0;
> +               ret = pm_generic_restore(dev);
>        else
>                ret = i2c_legacy_resume(dev);

The full function is:

static int i2c_device_pm_restore(struct device *dev)
{
	const struct dev_pm_ops *pm = dev->driver ? dev->driver->pm : NULL;
	int ret;

	if (pm)
		ret = pm->restore ? pm->restore(dev) : 0;
	else
		ret = i2c_legacy_resume(dev);

	if (!ret) {
		pm_runtime_disable(dev);
		pm_runtime_set_active(dev);
		pm_runtime_enable(dev);
	}

	return ret;
}

Shouldn't you be deleting the pm_runtime_* stuff from here?  There is
already done in pm_generic_restore() iff the callback exists and returns
zero.
_______________________________________________
linux-pm mailing list
linux-pm@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/linux-pm



[Index of Archives]     [Linux ACPI]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [CPU Freq]     [Kernel Newbies]     [Fedora Kernel]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux