Fixes conditions for RESTART, NOSTART and NOSTOP. The masks of start and
stop is already in brcmstb_set_i2c_start_stop(). Therefore, the caller
does not need a mask value.

Signed-off-by: Jaedon Shin <jaedon.s...@gmail.com>
---
 drivers/i2c/busses/i2c-brcmstb.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/i2c/busses/i2c-brcmstb.c b/drivers/i2c/busses/i2c-brcmstb.c
index 53eb8b0c9bad..dcd1209f843f 100644
--- a/drivers/i2c/busses/i2c-brcmstb.c
+++ b/drivers/i2c/busses/i2c-brcmstb.c
@@ -464,7 +464,7 @@ static int brcmstb_i2c_xfer(struct i2c_adapter *adapter,
                        pmsg->buf ? pmsg->buf[0] : '0', pmsg->len);
 
                if (i < (num - 1) && (msgs[i + 1].flags & I2C_M_NOSTART))
-                       brcmstb_set_i2c_start_stop(dev, ~(COND_START_STOP));
+                       brcmstb_set_i2c_start_stop(dev, 0);
                else
                        brcmstb_set_i2c_start_stop(dev,
                                                   COND_RESTART | COND_NOSTOP);
@@ -485,8 +485,7 @@ static int brcmstb_i2c_xfer(struct i2c_adapter *adapter,
                        bytes_to_xfer = min(len, N_DATA_BYTES);
 
                        if (len <= N_DATA_BYTES && i == (num - 1))
-                               brcmstb_set_i2c_start_stop(dev,
-                                                          ~(COND_START_STOP));
+                               brcmstb_set_i2c_start_stop(dev, 0);
 
                        rc = brcmstb_i2c_xfer_bsc_data(dev, tmp_buf,
                                                       bytes_to_xfer, pmsg);
-- 
2.6.1

--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to