Commit 9106e45c authored by Jaakko Laine's avatar Jaakko Laine Committed by Wolfram Sang

i2c: xiic: Improve struct memory alignment

xiic_i2c struct alignment causes the struct to
take more space in memory than strictly required.
Move state -member to end of struct to get less
padding.
Signed-off-by: default avatarJaakko Laine <ext-jaakko.laine@vaisala.com>
Suggested-by: default avatarMichal Simek <michal.simek@xilinx.com>
Acked-by: default avatarMichal Simek <michal.simek@xilinx.com>
Signed-off-by: default avatarWolfram Sang <wsa@kernel.org>
parent 0a9336ee
...@@ -54,11 +54,11 @@ enum xiic_endian { ...@@ -54,11 +54,11 @@ enum xiic_endian {
* @lock: Mutual exclusion * @lock: Mutual exclusion
* @tx_pos: Current pos in TX message * @tx_pos: Current pos in TX message
* @nmsgs: Number of messages in tx_msg * @nmsgs: Number of messages in tx_msg
* @state: See STATE_
* @rx_msg: Current RX message * @rx_msg: Current RX message
* @rx_pos: Position within current RX message * @rx_pos: Position within current RX message
* @endianness: big/little-endian byte order * @endianness: big/little-endian byte order
* @clk: Pointer to AXI4-lite input clock * @clk: Pointer to AXI4-lite input clock
* @state: See STATE_
*/ */
struct xiic_i2c { struct xiic_i2c {
struct device *dev; struct device *dev;
...@@ -69,11 +69,11 @@ struct xiic_i2c { ...@@ -69,11 +69,11 @@ struct xiic_i2c {
struct mutex lock; struct mutex lock;
unsigned int tx_pos; unsigned int tx_pos;
unsigned int nmsgs; unsigned int nmsgs;
enum xilinx_i2c_state state;
struct i2c_msg *rx_msg; struct i2c_msg *rx_msg;
int rx_pos; int rx_pos;
enum xiic_endian endianness; enum xiic_endian endianness;
struct clk *clk; struct clk *clk;
enum xilinx_i2c_state state;
}; };
......
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