|
|
@@ -23,6 +23,8 @@
|
|
|
#define CREATE_TRACE_POINTS
|
|
|
#include <trace/events/smbus.h>
|
|
|
|
|
|
+#include "i2c-core.h"
|
|
|
+
|
|
|
|
|
|
/* The SMBus parts */
|
|
|
|
|
|
@@ -530,7 +532,10 @@ s32 i2c_smbus_xfer(struct i2c_adapter *adapter, u16 addr,
|
|
|
{
|
|
|
s32 res;
|
|
|
|
|
|
- i2c_lock_bus(adapter, I2C_LOCK_SEGMENT);
|
|
|
+ res = __i2c_lock_bus_helper(adapter);
|
|
|
+ if (res)
|
|
|
+ return res;
|
|
|
+
|
|
|
res = __i2c_smbus_xfer(adapter, addr, flags, read_write,
|
|
|
command, protocol, data);
|
|
|
i2c_unlock_bus(adapter, I2C_LOCK_SEGMENT);
|