@@ -402,10 +402,6 @@ static int i801_transaction(struct i801_priv *priv, int xact)
int result;
const struct i2c_adapter *adap = &priv->adapter;
- result = i801_check_pre(priv);
- if (result < 0)
- return result;
-
if (priv->features & FEATURE_IRQ) {
outb_p(xact | SMBHSTCNT_INTREN | SMBHSTCNT_START,
SMBHSTCNT(priv));
@@ -562,10 +558,6 @@ static int i801_block_transaction_byte_by_byte(struct i801_priv *priv,
int result;
const struct i2c_adapter *adap = &priv->adapter;
- result = i801_check_pre(priv);
- if (result < 0)
- return result;
-
len = data->block[0];
if (read_write == I2C_SMBUS_WRITE) {
@@ -789,6 +781,10 @@ static s32 i801_access(struct i2c_adapter *adap, u16 addr,
goto out;
}
+ ret = i801_check_pre(priv);
+ if (ret < 0)
+ goto out;
+
if (block)
ret = i801_block_transaction(priv, flags, data, read_write,
size);