]> git.karo-electronics.de Git - linux-beck.git/commitdiff
i2c: brcmstb: use new 8 bit address helper function
authorWolfram Sang <wsa@the-dreams.de>
Sun, 3 Apr 2016 18:44:49 +0000 (20:44 +0200)
committerWolfram Sang <wsa@the-dreams.de>
Mon, 11 Apr 2016 16:54:59 +0000 (18:54 +0200)
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
drivers/i2c/busses/i2c-brcmstb.c

index 4a45408dd82060fc56b9e8e10c2e8534e8ebba5d..6a8cfc1344b2ed3bfc7f237ec5978173e7d452af 100644 (file)
@@ -446,9 +446,7 @@ static int brcmstb_i2c_do_addr(struct brcmstb_i2c_dev *dev,
 
                }
        } else {
-               addr = msg->addr << 1;
-               if (msg->flags & I2C_M_RD)
-                       addr |= 1;
+               addr = i2c_8bit_addr_from_msg(msg);
 
                bsc_writel(dev, addr, chip_address);
        }