summaryrefslogtreecommitdiffstats
path: root/drivers/i2c/busses
diff options
context:
space:
mode:
authorWolfram Sang <wsa@the-dreams.de>2016-04-03 20:44:54 +0200
committerWolfram Sang <wsa@the-dreams.de>2016-04-11 18:54:59 +0200
commit043f47f49b3646beab84019eefb2c336be87db5f (patch)
tree80ea9f0f8f6c57fb1e7a37189cec9b7587ccdf2f /drivers/i2c/busses
parenti2c: iop3xx: use new 8 bit address helper function (diff)
downloadlinux-043f47f49b3646beab84019eefb2c336be87db5f.tar.xz
linux-043f47f49b3646beab84019eefb2c336be87db5f.zip
i2c: lpc2k: use new 8 bit address helper function
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'drivers/i2c/busses')
-rw-r--r--drivers/i2c/busses/i2c-lpc2k.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/i2c/busses/i2c-lpc2k.c b/drivers/i2c/busses/i2c-lpc2k.c
index 8560a13bf1b3..586a15205e61 100644
--- a/drivers/i2c/busses/i2c-lpc2k.c
+++ b/drivers/i2c/busses/i2c-lpc2k.c
@@ -133,9 +133,7 @@ static void i2c_lpc2k_pump_msg(struct lpc2k_i2c *i2c)
case M_START:
case M_REPSTART:
/* Start bit was just sent out, send out addr and dir */
- data = i2c->msg->addr << 1;
- if (i2c->msg->flags & I2C_M_RD)
- data |= 1;
+ data = i2c_8bit_addr_from_msg(i2c->msg);
writel(data, i2c->base + LPC24XX_I2DAT);
writel(LPC24XX_STA, i2c->base + LPC24XX_I2CONCLR);