Commit 3f8a57bb authored by Wolfram Sang's avatar Wolfram Sang

i2c: sh_mobile: use new 8 bit address helper function

Reviewed-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
parent e3c60f3d
...@@ -398,8 +398,7 @@ static void sh_mobile_i2c_get_data(struct sh_mobile_i2c_data *pd, ...@@ -398,8 +398,7 @@ static void sh_mobile_i2c_get_data(struct sh_mobile_i2c_data *pd,
{ {
switch (pd->pos) { switch (pd->pos) {
case -1: case -1:
*buf = (pd->msg->addr & 0x7f) << 1; *buf = i2c_8bit_addr_from_msg(pd->msg);
*buf |= (pd->msg->flags & I2C_M_RD) ? 1 : 0;
break; break;
default: default:
*buf = pd->msg->buf[pd->pos]; *buf = pd->msg->buf[pd->pos];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment