diff options
Diffstat (limited to 'drivers/i2c/busses/i2c-designware-pcidrv.c')
-rw-r--r-- | drivers/i2c/busses/i2c-designware-pcidrv.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/i2c/busses/i2c-designware-pcidrv.c b/drivers/i2c/busses/i2c-designware-pcidrv.c index a736a2aaa66e..608e61209455 100644 --- a/drivers/i2c/busses/i2c-designware-pcidrv.c +++ b/drivers/i2c/busses/i2c-designware-pcidrv.c @@ -206,9 +206,7 @@ static int __maybe_unused i2c_dw_pci_suspend(struct device *dev) { struct dw_i2c_dev *i_dev = dev_get_drvdata(dev); - i2c_lock_bus(&i_dev->adapter, I2C_LOCK_ROOT_ADAPTER); - i_dev->suspended = true; - i2c_unlock_bus(&i_dev->adapter, I2C_LOCK_ROOT_ADAPTER); + i2c_mark_adapter_suspended(&i_dev->adapter); return i2c_dw_pci_runtime_suspend(dev); } @@ -227,9 +225,7 @@ static int __maybe_unused i2c_dw_pci_resume(struct device *dev) ret = i2c_dw_pci_runtime_resume(dev); - i2c_lock_bus(&i_dev->adapter, I2C_LOCK_ROOT_ADAPTER); - i_dev->suspended = false; - i2c_unlock_bus(&i_dev->adapter, I2C_LOCK_ROOT_ADAPTER); + i2c_mark_adapter_resumed(&i_dev->adapter); return ret; } |