For PCI runtime pm, some of the functions that are in the driver's legacy suspend function do not need to be called, as these are handled by the pci core. Do not call the driver's legacy suspend/ resume functions at runtime.
Signed-off-by: Kristen Carlson Accardi <[email protected]> --- drivers/i2c/busses/i2c-designware-pci.c | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/i2c/busses/i2c-designware-pci.c b/drivers/i2c/busses/i2c-designware-pci.c index bea467e..d1e0d8e 100644 --- a/drivers/i2c/busses/i2c-designware-pci.c +++ b/drivers/i2c/busses/i2c-designware-pci.c @@ -164,8 +164,11 @@ static int i2c_dw_pci_suspend(struct pci_dev *pdev, pm_message_t mesg) static int i2c_dw_pci_runtime_suspend(struct device *dev) { struct pci_dev *pdev = to_pci_dev(dev); + struct dw_i2c_dev *i2c = pci_get_drvdata(pdev); + dev_dbg(dev, "PCI suspend called\n"); - return i2c_dw_pci_suspend(pdev, PMSG_SUSPEND); + i2c_dw_disable(i2c); + return 0; } static int i2c_dw_pci_resume(struct pci_dev *pdev) @@ -197,8 +200,11 @@ static int i2c_dw_pci_resume(struct pci_dev *pdev) static int i2c_dw_pci_runtime_resume(struct device *dev) { struct pci_dev *pdev = to_pci_dev(dev); + struct dw_i2c_dev *i2c = pci_get_drvdata(pdev); + dev_dbg(dev, "runtime_resume called\n"); - return i2c_dw_pci_resume(pdev); + i2c_dw_enable(i2c); + return 0; } static int i2c_dw_pci_runtime_idle(struct device *dev) -- 1.7.3.1 _______________________________________________ MeeGo-kernel mailing list [email protected] http://lists.meego.com/listinfo/meego-kernel
