aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/i2c/i2c-core.c
diff options
context:
space:
mode:
authorPeter Rosin <peda@axentia.se>2016-06-29 15:04:03 +0200
committerWolfram Sang <wsa@the-dreams.de>2016-08-25 18:02:14 +0200
commitfb79e09a74faf39fbeee975e0ead442b7b7f6aac (patch)
tree465679257bdac8b169b5e5d20b17aabbd9859aef /drivers/i2c/i2c-core.c
parenteeprom: at24: check if the chip is functional in probe() (diff)
downloadwireguard-linux-fb79e09a74faf39fbeee975e0ead442b7b7f6aac.tar.xz
wireguard-linux-fb79e09a74faf39fbeee975e0ead442b7b7f6aac.zip
i2c: add i2c_trylock_bus wrapper, use it
This unifies usage with i2c_lock_bus and i2c_unlock_bus, and paves the way for the next patch which looks a bit saner with this preparatory work taken care of beforehand. Signed-off-by: Peter Rosin <peda@axentia.se> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'drivers/i2c/i2c-core.c')
-rw-r--r--drivers/i2c/i2c-core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c
index da3a02ef4a31..56e50ca905ba 100644
--- a/drivers/i2c/i2c-core.c
+++ b/drivers/i2c/i2c-core.c
@@ -2459,7 +2459,7 @@ int i2c_transfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num)
#endif
if (in_atomic() || irqs_disabled()) {
- ret = adap->trylock_bus(adap, I2C_LOCK_SEGMENT);
+ ret = i2c_trylock_bus(adap, I2C_LOCK_SEGMENT);
if (!ret)
/* I2C activity is ongoing. */
return -EAGAIN;