mirror of
https://github.com/torvalds/linux.git
synced 2026-05-23 22:52:19 +02:00
i2c: i801: use i2c_mark_adapter_suspended/resumed
When entering the suspend callback, at first we should ensure that transfers are finished and I2C core can't start further transfers. Use i2c_mark_adapter_suspended() for this purpose, and complement it with a call to i2c_mark_adapter_resumed() in the resume path. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Reviewed-by: Jean Delvare <jdelvare@suse.de> Reviewed-by: Andi Shyti <andi.shyti@kernel.org> Signed-off-by: Wolfram Sang <wsa@kernel.org>
This commit is contained in:
parent
cdb55bdb50
commit
d0d0f827e0
|
|
@ -1818,6 +1818,7 @@ static int i801_suspend(struct device *dev)
|
|||
{
|
||||
struct i801_priv *priv = dev_get_drvdata(dev);
|
||||
|
||||
i2c_mark_adapter_suspended(&priv->adapter);
|
||||
i801_restore_regs(priv);
|
||||
|
||||
return 0;
|
||||
|
|
@ -1829,6 +1830,7 @@ static int i801_resume(struct device *dev)
|
|||
|
||||
i801_setup_hstcfg(priv);
|
||||
i801_enable_host_notify(&priv->adapter);
|
||||
i2c_mark_adapter_resumed(&priv->adapter);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user