summaryrefslogtreecommitdiffstats
path: root/drivers/i2c
diff options
context:
space:
mode:
authorPatrice Chotard <patrice.chotard@st.com>2020-11-19 08:25:39 +0100
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2020-11-23 18:34:55 +0100
commit4e1d9a737d00f2cc811dc5654f82c92c7d80e98c (patch)
tree71088fb08b6d338b88fbab7de414d05c5452461e /drivers/i2c
parentab150c3f80dcce670926ab3ca412be5047011d22 (diff)
downloadlinux-stable-4e1d9a737d00f2cc811dc5654f82c92c7d80e98c.tar.gz
linux-stable-4e1d9a737d00f2cc811dc5654f82c92c7d80e98c.tar.bz2
linux-stable-4e1d9a737d00f2cc811dc5654f82c92c7d80e98c.zip
PM: sleep: Add dev_wakeup_path() helper
Add dev_wakeup_path() helper to avoid to spread dev->power.wakeup_path test in drivers. Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/i2c')
-rw-r--r--drivers/i2c/busses/i2c-stm32f7.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/i2c/busses/i2c-stm32f7.c b/drivers/i2c/busses/i2c-stm32f7.c
index f41f51a176a1..9aa8e65b511e 100644
--- a/drivers/i2c/busses/i2c-stm32f7.c
+++ b/drivers/i2c/busses/i2c-stm32f7.c
@@ -2322,7 +2322,7 @@ static int stm32f7_i2c_suspend(struct device *dev)
i2c_mark_adapter_suspended(&i2c_dev->adap);
- if (!device_may_wakeup(dev) && !dev->power.wakeup_path) {
+ if (!device_may_wakeup(dev) && !device_wakeup_path(dev)) {
ret = stm32f7_i2c_regs_backup(i2c_dev);
if (ret < 0) {
i2c_mark_adapter_resumed(&i2c_dev->adap);
@@ -2341,7 +2341,7 @@ static int stm32f7_i2c_resume(struct device *dev)
struct stm32f7_i2c_dev *i2c_dev = dev_get_drvdata(dev);
int ret;
- if (!device_may_wakeup(dev) && !dev->power.wakeup_path) {
+ if (!device_may_wakeup(dev) && !device_wakeup_path(dev)) {
ret = pm_runtime_force_resume(dev);
if (ret < 0)
return ret;