diff options
author | Hans de Goede <hdegoede@redhat.com> | 2022-02-23 14:48:39 +0100 |
---|---|---|
committer | Wolfram Sang <wsa@kernel.org> | 2022-03-01 16:31:39 +0100 |
commit | 80704a84a9f8276337a83c0c3ce641af3b27c79c (patch) | |
tree | b81250f514f0124e4ec0e3265158599a61fb2dda /drivers/i2c/busses/i2c-designware-master.c | |
parent | c57813b8b288dcb5e158993cfdff31a60bc24955 (diff) | |
download | lwn-80704a84a9f8276337a83c0c3ce641af3b27c79c.tar.gz lwn-80704a84a9f8276337a83c0c3ce641af3b27c79c.zip |
i2c: designware: Use the i2c_mark_adapter_suspended/resumed() helpers
Use the i2c_mark_adapter_suspended/resumed() i2c-core helpers and rely
on the i2c-core's suspended checking instead of using DIY code.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
Diffstat (limited to 'drivers/i2c/busses/i2c-designware-master.c')
-rw-r--r-- | drivers/i2c/busses/i2c-designware-master.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/drivers/i2c/busses/i2c-designware-master.c b/drivers/i2c/busses/i2c-designware-master.c index 1a4b23556db3..44a94b225ed8 100644 --- a/drivers/i2c/busses/i2c-designware-master.c +++ b/drivers/i2c/busses/i2c-designware-master.c @@ -567,11 +567,6 @@ i2c_dw_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], int num) goto done_nolock; } - if (dev_WARN_ONCE(dev->dev, dev->suspended, "Transfer while suspended\n")) { - ret = -ESHUTDOWN; - goto done_nolock; - } - reinit_completion(&dev->cmd_complete); dev->msgs = msgs; dev->msgs_num = num; |