From: Wolfram Sang Date: Sun, 3 Apr 2016 18:44:59 +0000 (+0200) Subject: i2c: sh_mobile: use new 8 bit address helper function X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=3f8a57bb6d5fb37c0b02d091184b01eab9dcf43a;p=linux-beck.git i2c: sh_mobile: use new 8 bit address helper function Reviewed-by: Andy Shevchenko Signed-off-by: Wolfram Sang --- diff --git a/drivers/i2c/busses/i2c-sh_mobile.c b/drivers/i2c/busses/i2c-sh_mobile.c index 7d2bd3ec2d2d..6fb3e2645992 100644 --- a/drivers/i2c/busses/i2c-sh_mobile.c +++ b/drivers/i2c/busses/i2c-sh_mobile.c @@ -398,8 +398,7 @@ static void sh_mobile_i2c_get_data(struct sh_mobile_i2c_data *pd, { switch (pd->pos) { case -1: - *buf = (pd->msg->addr & 0x7f) << 1; - *buf |= (pd->msg->flags & I2C_M_RD) ? 1 : 0; + *buf = i2c_8bit_addr_from_msg(pd->msg); break; default: *buf = pd->msg->buf[pd->pos];