]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
i2c: i801: Don't restore config registers on runtime PM
authorJean Delvare <jdelvare@suse.de>
Fri, 23 Nov 2018 08:33:04 +0000 (16:33 +0800)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Mon, 14 Jan 2019 09:28:55 +0000 (09:28 +0000)
BugLink: https://bugs.launchpad.net/bugs/1802135
Restoring configuration registers is only needed when we hand control
to the firmware. This is never the case with runtime power
management. The device will autosuspend whenever not used, so avoid
useless register writes by defining suspend/resume only, and not
runtime_suspend/runtime_resume.

Signed-off-by: Jean Delvare <jdelvare@suse.de>
Reviewed-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
(cherry picked from commit a9c8088c7988e3a8a364cac9c26eba9ee2ea6153)
Signed-off-by: Aaron Ma <aaron.ma@canonical.com>
Acked-by: Anthony Wong <anthony.wong@canonical.com>
Acked-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/i2c/busses/i2c-i801.c

index ba8df2fde1b2769fe65bdf49f338625577b6ced9..00da6eae32db80bd4b1f222ee65133cb22208b8c 100644 (file)
@@ -1730,8 +1730,7 @@ static int i801_resume(struct device *dev)
 }
 #endif
 
-static UNIVERSAL_DEV_PM_OPS(i801_pm_ops, i801_suspend,
-                           i801_resume, NULL);
+static SIMPLE_DEV_PM_OPS(i801_pm_ops, i801_suspend, i801_resume);
 
 static struct pci_driver i801_driver = {
        .name           = "i801_smbus",