summaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-ep93xx.c
diff options
context:
space:
mode:
authorH Hartley Sweeten <hartleys@visionengravers.com>2013-07-02 10:07:01 -0700
committerMark Brown <broonie@linaro.org>2013-07-15 11:37:13 +0100
commit701c3587ee38ed53719187b0f1b059e113ac534f (patch)
treeb43410e88d0d75f5933ca3e8ef22967f024f7ebf /drivers/spi/spi-ep93xx.c
parent8d7586bda032748ceec44416fa32a711a62e4954 (diff)
downloadlinux-701c3587ee38ed53719187b0f1b059e113ac534f.tar.gz
linux-701c3587ee38ed53719187b0f1b059e113ac534f.tar.bz2
linux-701c3587ee38ed53719187b0f1b059e113ac534f.zip
spi: spi-ep93xx: remove bits_per_word() helper
Check t->bits_per_word directly and remove the inline helper function. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Acked-by: Mika Westerberg <mika.westerberg@iki.fi> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'drivers/spi/spi-ep93xx.c')
-rw-r--r--drivers/spi/spi-ep93xx.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/drivers/spi/spi-ep93xx.c b/drivers/spi/spi-ep93xx.c
index d7eccfc40ac9..d5e64201cdd3 100644
--- a/drivers/spi/spi-ep93xx.c
+++ b/drivers/spi/spi-ep93xx.c
@@ -429,17 +429,9 @@ static void ep93xx_spi_chip_setup(const struct ep93xx_spi *espi,
ep93xx_spi_write_u16(espi, SSPCR0, cr0);
}
-static inline int bits_per_word(const struct ep93xx_spi *espi)
-{
- struct spi_message *msg = espi->current_msg;
- struct spi_transfer *t = msg->state;
-
- return t->bits_per_word;
-}
-
static void ep93xx_do_write(struct ep93xx_spi *espi, struct spi_transfer *t)
{
- if (bits_per_word(espi) > 8) {
+ if (t->bits_per_word > 8) {
u16 tx_val = 0;
if (t->tx_buf)
@@ -458,7 +450,7 @@ static void ep93xx_do_write(struct ep93xx_spi *espi, struct spi_transfer *t)
static void ep93xx_do_read(struct ep93xx_spi *espi, struct spi_transfer *t)
{
- if (bits_per_word(espi) > 8) {
+ if (t->bits_per_word > 8) {
u16 rx_val;
rx_val = ep93xx_spi_read_u16(espi, SSPDR);
@@ -544,7 +536,7 @@ ep93xx_spi_dma_prepare(struct ep93xx_spi *espi, enum dma_transfer_direction dir)
size_t len = t->len;
int i, ret, nents;
- if (bits_per_word(espi) > 8)
+ if (t->bits_per_word > 8)
buswidth = DMA_SLAVE_BUSWIDTH_2_BYTES;
else
buswidth = DMA_SLAVE_BUSWIDTH_1_BYTE;