i2c-designware: i2c_dw_xfer_msg: Introduce a local "buf" pointer
authorShinya Kuribayashi <shinya.kuribayashi@necel.com>
Fri, 6 Nov 2009 12:49:14 +0000 (21:49 +0900)
committerBen Dooks <ben-linux@fluff.org>
Wed, 9 Dec 2009 00:19:11 +0000 (00:19 +0000)
commit26ea15b1f584de02bc85e9c3968d523386332f65
treedbbd2db2557276ddb8934bdab36ad723909af5ad
parent81e798b73aec2d7ce06d18bd191b088c233e554f
i2c-designware: i2c_dw_xfer_msg: Introduce a local "buf" pointer

While we have a local variable "buf_len" for dev->tx_buf_len, we don't
have such local variable for dev->tx_buf pointer.  While "buf_len" is
restored at first then updated when we start processing a new i2c_msg
(determined by STATUS_WRITE_IN_PROGRESS flag), ->tx_buf is different.

Such inconsistency makes the code slightly hard to follow.

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>
drivers/i2c/busses/i2c-designware.c