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>
This commit is contained in:
Wolfram Sang 2016-04-03 20:45:00 +02:00
parent 3f8a57bb6d
commit 5c1274fab5

View File

@ -190,9 +190,7 @@ static void i2c_sirfsoc_set_address(struct sirfsoc_i2c *siic,
writel(regval, siic->base + SIRFSOC_I2C_CMD(siic->cmd_ptr++)); writel(regval, siic->base + SIRFSOC_I2C_CMD(siic->cmd_ptr++));
addr = msg->addr << 1; /* Generate address */ addr = i2c_8bit_addr_from_msg(msg);
if (msg->flags & I2C_M_RD)
addr |= 1;
/* Reverse direction bit */ /* Reverse direction bit */
if (msg->flags & I2C_M_REV_DIR_ADDR) if (msg->flags & I2C_M_REV_DIR_ADDR)