Commit 7756e1ee authored by Wolfram Sang's avatar Wolfram Sang

i2c: powermac: use new 8 bit address helper function

Reviewed-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
parent 380a295c
...@@ -150,13 +150,11 @@ static int i2c_powermac_master_xfer( struct i2c_adapter *adap, ...@@ -150,13 +150,11 @@ static int i2c_powermac_master_xfer( struct i2c_adapter *adap,
{ {
struct pmac_i2c_bus *bus = i2c_get_adapdata(adap); struct pmac_i2c_bus *bus = i2c_get_adapdata(adap);
int rc = 0; int rc = 0;
int read;
int addrdir; int addrdir;
if (msgs->flags & I2C_M_TEN) if (msgs->flags & I2C_M_TEN)
return -EINVAL; return -EINVAL;
read = (msgs->flags & I2C_M_RD) != 0; addrdir = i2c_8bit_addr_from_msg(msgs);
addrdir = (msgs->addr << 1) | read;
rc = pmac_i2c_open(bus, 0); rc = pmac_i2c_open(bus, 0);
if (rc) { if (rc) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment