From: Wolfram Sang Date: Sun, 3 Apr 2016 18:44:48 +0000 (+0200) Subject: i2c: bcm-kona: use new 8 bit address helper function X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=191d738d847e63b24da7cacbdfb179e5b5a9145f;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git i2c: bcm-kona: use new 8 bit address helper function Reviewed-by: Andy Shevchenko Signed-off-by: Wolfram Sang --- diff --git a/drivers/i2c/busses/i2c-bcm-kona.c b/drivers/i2c/busses/i2c-bcm-kona.c index 2c9d9b1c8e64..ac9f47679c3a 100644 --- a/drivers/i2c/busses/i2c-bcm-kona.c +++ b/drivers/i2c/busses/i2c-bcm-kona.c @@ -501,10 +501,7 @@ static int bcm_kona_i2c_do_addr(struct bcm_kona_i2c_dev *dev, return -EREMOTEIO; } } else { - addr = msg->addr << 1; - - if (msg->flags & I2C_M_RD) - addr |= 1; + addr = i2c_8bit_addr_from_msg(msg); if (bcm_kona_i2c_write_byte(dev, addr, 0) < 0) return -EREMOTEIO;