diff options
author | Wolfram Sang <wsa@the-dreams.de> | 2016-04-03 21:44:57 +0300 |
---|---|---|
committer | Wolfram Sang <wsa@the-dreams.de> | 2016-04-11 19:54:59 +0300 |
commit | 7756e1ee78b37ddb98bfcc815002cb885a0449c8 (patch) | |
tree | 0f45cda860bc29eb4ec916880fee0bbfc36c6bea /drivers/i2c/busses/i2c-powermac.c | |
parent | 380a295c87a6423390898b98e388e1b0a399bb08 (diff) | |
download | linux-7756e1ee78b37ddb98bfcc815002cb885a0449c8.tar.xz |
i2c: powermac: 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-powermac.c')
-rw-r--r-- | drivers/i2c/busses/i2c-powermac.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/i2c/busses/i2c-powermac.c b/drivers/i2c/busses/i2c-powermac.c index 6abcf696e359..b0d9dee14a7e 100644 --- a/drivers/i2c/busses/i2c-powermac.c +++ b/drivers/i2c/busses/i2c-powermac.c @@ -150,13 +150,11 @@ static int i2c_powermac_master_xfer( struct i2c_adapter *adap, { struct pmac_i2c_bus *bus = i2c_get_adapdata(adap); int rc = 0; - int read; int addrdir; if (msgs->flags & I2C_M_TEN) return -EINVAL; - read = (msgs->flags & I2C_M_RD) != 0; - addrdir = (msgs->addr << 1) | read; + addrdir = i2c_8bit_addr_from_msg(msgs); rc = pmac_i2c_open(bus, 0); if (rc) { |