diff options
author | Peter Rosin <peda@axentia.se> | 2016-06-29 09:04:03 -0400 |
---|---|---|
committer | Wolfram Sang <wsa@the-dreams.de> | 2016-08-25 12:02:14 -0400 |
commit | fb79e09a74faf39fbeee975e0ead442b7b7f6aac (patch) | |
tree | 465679257bdac8b169b5e5d20b17aabbd9859aef /drivers/i2c/i2c-core.c | |
parent | 00f0ea70d2b82b7d7afeb1bdedc9169eb8ea6675 (diff) |
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.c | 2 |
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) | |||
2459 | #endif | 2459 | #endif |
2460 | 2460 | ||
2461 | if (in_atomic() || irqs_disabled()) { | 2461 | if (in_atomic() || irqs_disabled()) { |
2462 | ret = adap->trylock_bus(adap, I2C_LOCK_SEGMENT); | 2462 | ret = i2c_trylock_bus(adap, I2C_LOCK_SEGMENT); |
2463 | if (!ret) | 2463 | if (!ret) |
2464 | /* I2C activity is ongoing. */ | 2464 | /* I2C activity is ongoing. */ |
2465 | return -EAGAIN; | 2465 | return -EAGAIN; |