summaryrefslogtreecommitdiffstats
path: root/drivers/i2c/busses/i2c-sh_mobile.c
diff options
context:
space:
mode:
authorWolfram Sang <wsa@the-dreams.de>2016-04-03 20:44:59 +0200
committerWolfram Sang <wsa@the-dreams.de>2016-04-11 18:54:59 +0200
commit3f8a57bb6d5fb37c0b02d091184b01eab9dcf43a (patch)
treeee5d59b5ad895007d4ad1924172ebd240b414f69 /drivers/i2c/busses/i2c-sh_mobile.c
parenti2c: qup: use new 8 bit address helper function (diff)
downloadlinux-3f8a57bb6d5fb37c0b02d091184b01eab9dcf43a.tar.xz
linux-3f8a57bb6d5fb37c0b02d091184b01eab9dcf43a.zip
i2c: sh_mobile: 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-sh_mobile.c')
-rw-r--r--drivers/i2c/busses/i2c-sh_mobile.c3
1 files changed, 1 insertions, 2 deletions
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];