i2c: add i2c_trylock_bus wrapper, use it
[cascardo/linux.git] / drivers / i2c / i2c-core.c
index da3a02e..56e50ca 100644 (file)
@@ -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;