mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 10:49:33 +00:00
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: Jaakko Laine <ext-jaakko.laine@vaisala.com> Suggested-by: Michal Simek <michal.simek@xilinx.com> Acked-by: Michal Simek <michal.simek@xilinx.com> Signed-off-by: Wolfram Sang <wsa@kernel.org>
This commit is contained in:
parent
0a9336ee13
commit
9106e45cea
1 changed files with 2 additions and 2 deletions
|
@ -54,11 +54,11 @@ enum xiic_endian {
|
|||
* @lock: Mutual exclusion
|
||||
* @tx_pos: Current pos in TX message
|
||||
* @nmsgs: Number of messages in tx_msg
|
||||
* @state: See STATE_
|
||||
* @rx_msg: Current RX message
|
||||
* @rx_pos: Position within current RX message
|
||||
* @endianness: big/little-endian byte order
|
||||
* @clk: Pointer to AXI4-lite input clock
|
||||
* @state: See STATE_
|
||||
*/
|
||||
struct xiic_i2c {
|
||||
struct device *dev;
|
||||
|
@ -69,11 +69,11 @@ struct xiic_i2c {
|
|||
struct mutex lock;
|
||||
unsigned int tx_pos;
|
||||
unsigned int nmsgs;
|
||||
enum xilinx_i2c_state state;
|
||||
struct i2c_msg *rx_msg;
|
||||
int rx_pos;
|
||||
enum xiic_endian endianness;
|
||||
struct clk *clk;
|
||||
enum xilinx_i2c_state state;
|
||||
};
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue