diff options
author | Shinya Kuribayashi <shinya.kuribayashi@necel.com> | 2009-11-06 07:46:04 -0500 |
---|---|---|
committer | Ben Dooks <ben-linux@fluff.org> | 2009-12-08 19:19:10 -0500 |
commit | e77cf23251e7f55335d986ee0a6d2c0084889dee (patch) | |
tree | 66476bda8fc91ba10485ff086d4d8d63b8784b6e /drivers/i2c | |
parent | 78839bd0f22c3b6e7273568e042bf4d637cfedb3 (diff) |
i2c-designware: i2c_dw_xfer_msg: Use "struct dw_i2c_dev" pointer
We don't have to use "struct i2c_adapter" pointer here.
Let's use a local "struct dw_i2c_dev" pointer, instead.
Signed-off-by: Shinya Kuribayashi <shinya.kuribayashi@necel.com>
Acked-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Diffstat (limited to 'drivers/i2c')
-rw-r--r-- | drivers/i2c/busses/i2c-designware.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/i2c/busses/i2c-designware.c b/drivers/i2c/busses/i2c-designware.c index bb7b25766ea9..443f398a2156 100644 --- a/drivers/i2c/busses/i2c-designware.c +++ b/drivers/i2c/busses/i2c-designware.c | |||
@@ -254,9 +254,8 @@ static int i2c_dw_wait_bus_not_busy(struct dw_i2c_dev *dev) | |||
254 | * that is longer than the size of the TX FIFO. | 254 | * that is longer than the size of the TX FIFO. |
255 | */ | 255 | */ |
256 | static void | 256 | static void |
257 | i2c_dw_xfer_msg(struct i2c_adapter *adap) | 257 | i2c_dw_xfer_msg(struct dw_i2c_dev *dev) |
258 | { | 258 | { |
259 | struct dw_i2c_dev *dev = i2c_get_adapdata(adap); | ||
260 | struct i2c_msg *msgs = dev->msgs; | 259 | struct i2c_msg *msgs = dev->msgs; |
261 | int num = dev->msgs_num; | 260 | int num = dev->msgs_num; |
262 | u32 ic_con, intr_mask; | 261 | u32 ic_con, intr_mask; |
@@ -394,7 +393,7 @@ i2c_dw_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], int num) | |||
394 | goto done; | 393 | goto done; |
395 | 394 | ||
396 | /* start the transfers */ | 395 | /* start the transfers */ |
397 | i2c_dw_xfer_msg(adap); | 396 | i2c_dw_xfer_msg(dev); |
398 | 397 | ||
399 | /* wait for tx to complete */ | 398 | /* wait for tx to complete */ |
400 | ret = wait_for_completion_interruptible_timeout(&dev->cmd_complete, HZ); | 399 | ret = wait_for_completion_interruptible_timeout(&dev->cmd_complete, HZ); |
@@ -450,7 +449,7 @@ static void dw_i2c_pump_msg(unsigned long data) | |||
450 | u32 intr_mask; | 449 | u32 intr_mask; |
451 | 450 | ||
452 | i2c_dw_read(dev); | 451 | i2c_dw_read(dev); |
453 | i2c_dw_xfer_msg(&dev->adapter); | 452 | i2c_dw_xfer_msg(dev); |
454 | 453 | ||
455 | intr_mask = DW_IC_INTR_STOP_DET | DW_IC_INTR_TX_ABRT; | 454 | intr_mask = DW_IC_INTR_STOP_DET | DW_IC_INTR_TX_ABRT; |
456 | if (dev->status & STATUS_WRITE_IN_PROGRESS) | 455 | if (dev->status & STATUS_WRITE_IN_PROGRESS) |