summaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorTrent Piepho <tpiepho@gmail.com>2013-12-13 18:27:44 -0800
committerMark Brown <broonie@linaro.org>2013-12-16 21:03:42 +0000
commit89c1f60746106755e29dcc3db9f22e37000891ef (patch)
tree376230d90e6c40a0c0f8936bf87689e5e8316788 /include/linux
parent0c64bc1b5eace5f48dec7305b83ee4d613d58c94 (diff)
downloadblackbird-op-linux-89c1f60746106755e29dcc3db9f22e37000891ef.tar.gz
blackbird-op-linux-89c1f60746106755e29dcc3db9f22e37000891ef.zip
spi: Order fields in spi_device for better packing
Now that spi_device->mode is a u16, the chip_select, bits_per_mode, and mode fields pack poorly, taking 8 bytes: four data and four padding. By moving (u8)bits_per_word up one position, to after (u8)chip_select, they pack better and only use 4 bytes. Signed-off-by: Trent Piepho <tpiepho@gmail.com> Reviewed-by: Sourav Poddar <sourav.poddar@ti.com> Tested-by: Sourav Poddar <sourav.poddar@ti.com>g Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/spi/spi.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h
index 8c62ba74dd91..27a882978c15 100644
--- a/include/linux/spi/spi.h
+++ b/include/linux/spi/spi.h
@@ -75,6 +75,7 @@ struct spi_device {
struct spi_master *master;
u32 max_speed_hz;
u8 chip_select;
+ u8 bits_per_word;
u16 mode;
#define SPI_CPHA 0x01 /* clock phase */
#define SPI_CPOL 0x02 /* clock polarity */
@@ -92,7 +93,6 @@ struct spi_device {
#define SPI_TX_QUAD 0x200 /* transmit with 4 wires */
#define SPI_RX_DUAL 0x400 /* receive with 2 wires */
#define SPI_RX_QUAD 0x800 /* receive with 4 wires */
- u8 bits_per_word;
int irq;
void *controller_state;
void *controller_data;
OpenPOWER on IntegriCloud