summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBill Richardson <wfrichar@chromium.org>2012-02-13 14:40:46 -0800
committerBill Richardson <wfrichar@chromium.org>2012-02-13 14:43:12 -0800
commit616c60e70727726f5395cf6730010f4b1a9b6ab5 (patch)
tree5da88492dca2e0b4cf5b2fa6b13b20fd14fe1276
parent6b8e8be7033a2808ff4839bc27765bcc5d7e4e63 (diff)
downloadchrome-ec-616c60e70727726f5395cf6730010f4b1a9b6ab5.tar.gz
Tiny code cleanup in i2c.c
BUG=none TEST=none Signed-off-by: Bill Richardson <wfrichar@chromium.org> Change-Id: Ibce7c92767d2a65b992a1e629057cc52c7156a20
-rw-r--r--chip/lm4/i2c.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/chip/lm4/i2c.c b/chip/lm4/i2c.c
index 67316a519a..aa30a2f56a 100644
--- a/chip/lm4/i2c.c
+++ b/chip/lm4/i2c.c
@@ -32,7 +32,7 @@ static int wait_idle(int port)
LM4_I2C_MIMR(port) = 0x03;
wait_msg = task_wait_msg(1000000);
LM4_I2C_MIMR(port) = 0x00;
- task_waiting_on_port[port] = -1;
+ task_waiting_on_port[port] = TASK_ID_INVALID;
if (wait_msg == 1 << TASK_ID_TIMER)
return EC_ERROR_TIMEOUT;
@@ -56,7 +56,7 @@ int i2c_read16(int port, int slave_addr, int offset, int* data)
/* Transmit the offset address to the slave; leave the master in
* transmit state. */
- LM4_I2C_MSA(port) = (slave_addr & 0xff) | 0x00;
+ LM4_I2C_MSA(port) = slave_addr & 0xff;
LM4_I2C_MDR(port) = offset & 0xff;
LM4_I2C_MCS(port) = 0x03;
@@ -98,7 +98,7 @@ int i2c_write16(int port, int slave_addr, int offset, int data)
/* Transmit the offset address to the slave; leave the master in
* transmit state. */
LM4_I2C_MDR(port) = offset & 0xff;
- LM4_I2C_MSA(port) = (slave_addr & 0xff) | 0x00;
+ LM4_I2C_MSA(port) = slave_addr & 0xff;
LM4_I2C_MCS(port) = 0x03;
rv = wait_idle(port);