[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <52E744AC.2050606@intel.com>
Date: Tue, 28 Jan 2014 13:48:28 +0800
From: "xinhui.pan" <xinhuix.pan@...el.com>
To: linux-kernel@...r.kernel.org
CC: linux-i2c@...r.kernel.org, wsa@...-dreams.de,
mika.westerberg@...ux.intel.com, andriy.shevchenko@...ux.intel.com,
yanmin_zhang@...ux.intel.com, bo.he@...el.com
Subject: [PATCH] i2c-designware-pcidrv: fix the incorrect return of idle callback
From: "xinhui.pan" <xinhuix.pan@...el.com>
i2c_dw_pci_runtime_idle should return -EBUSY rather than zero if it do success.
Otherwise rpm_idle will call pm_suspend again and that may cause pm_schedule_suspend delay invalidate.
Signed-off-by: bo.he <bo.he@...el.com>
Signed-off-by: xinhui.pan <xinhuix.pan@...el.com>
---
drivers/i2c/busses/i2c-designware-pcidrv.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/i2c/busses/i2c-designware-pcidrv.c b/drivers/i2c/busses/i2c-designware-pcidrv.c
index f6ed06c..96e81f6 100644
--- a/drivers/i2c/busses/i2c-designware-pcidrv.c
+++ b/drivers/i2c/busses/i2c-designware-pcidrv.c
@@ -190,8 +190,8 @@ static int i2c_dw_pci_runtime_idle(struct device *dev)
int err = pm_schedule_suspend(dev, 500);
dev_dbg(dev, "runtime_idle called\n");
- if (err != 0)
- return 0;
+ if (err)
+ return err;
return -EBUSY;
}
--
1.7.9.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists