summaryrefslogtreecommitdiff
path: root/drivers/i2c/busses/i2c-sirf.c
diff options
context:
space:
mode:
authorWolfram Sang <wsa@the-dreams.de>2016-04-03 21:45:00 +0300
committerWolfram Sang <wsa@the-dreams.de>2016-04-11 19:54:59 +0300
commit5c1274fab5c10aa193f5740dd76780010bda77d7 (patch)
tree0e8171ddf7dcfd32aca7e6113bc5a52b757b0706 /drivers/i2c/busses/i2c-sirf.c
parent3f8a57bb6d5fb37c0b02d091184b01eab9dcf43a (diff)
downloadlinux-5c1274fab5c10aa193f5740dd76780010bda77d7.tar.xz
i2c: sirf: 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/i2c-sirf.c')
-rw-r--r--drivers/i2c/busses/i2c-sirf.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/i2c/busses/i2c-sirf.c b/drivers/i2c/busses/i2c-sirf.c
index 13e51ef6af73..792a42bdd335 100644
--- a/drivers/i2c/busses/i2c-sirf.c
+++ b/drivers/i2c/busses/i2c-sirf.c
@@ -190,9 +190,7 @@ static void i2c_sirfsoc_set_address(struct sirfsoc_i2c *siic,
writel(regval, siic->base + SIRFSOC_I2C_CMD(siic->cmd_ptr++));
- addr = msg->addr << 1; /* Generate address */
- if (msg->flags & I2C_M_RD)
- addr |= 1;
+ addr = i2c_8bit_addr_from_msg(msg);
/* Reverse direction bit */
if (msg->flags & I2C_M_REV_DIR_ADDR)