aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/spi
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/spi')
-rw-r--r--drivers/spi/au1550_spi.c4
-rw-r--r--drivers/spi/spi_bitbang.c8
2 files changed, 7 insertions, 5 deletions
diff --git a/drivers/spi/au1550_spi.c b/drivers/spi/au1550_spi.c
index c47a650183a1..41a3d00c4515 100644
--- a/drivers/spi/au1550_spi.c
+++ b/drivers/spi/au1550_spi.c
@@ -99,7 +99,7 @@ static dbdev_tab_t au1550_spi_mem_dbdev =
99static void au1550_spi_bits_handlers_set(struct au1550_spi *hw, int bpw); 99static void au1550_spi_bits_handlers_set(struct au1550_spi *hw, int bpw);
100 100
101 101
102/** 102/*
103 * compute BRG and DIV bits to setup spi clock based on main input clock rate 103 * compute BRG and DIV bits to setup spi clock based on main input clock rate
104 * that was specified in platform data structure 104 * that was specified in platform data structure
105 * according to au1550 datasheet: 105 * according to au1550 datasheet:
@@ -650,7 +650,7 @@ static int au1550_spi_txrx_bufs(struct spi_device *spi, struct spi_transfer *t)
650 return hw->txrx_bufs(spi, t); 650 return hw->txrx_bufs(spi, t);
651} 651}
652 652
653static irqreturn_t au1550_spi_irq(int irq, void *dev, struct pt_regs *regs) 653static irqreturn_t au1550_spi_irq(int irq, void *dev)
654{ 654{
655 struct au1550_spi *hw = dev; 655 struct au1550_spi *hw = dev;
656 return hw->irq_callback(hw); 656 return hw->irq_callback(hw);
diff --git a/drivers/spi/spi_bitbang.c b/drivers/spi/spi_bitbang.c
index f7f8580edad8..71e881419cdd 100644
--- a/drivers/spi/spi_bitbang.c
+++ b/drivers/spi/spi_bitbang.c
@@ -344,12 +344,14 @@ static void bitbang_work(struct work_struct *work)
344 t->rx_dma = t->tx_dma = 0; 344 t->rx_dma = t->tx_dma = 0;
345 status = bitbang->txrx_bufs(spi, t); 345 status = bitbang->txrx_bufs(spi, t);
346 } 346 }
347 if (status > 0)
348 m->actual_length += status;
347 if (status != t->len) { 349 if (status != t->len) {
348 if (status > 0) 350 /* always report some kind of error */
349 status = -EMSGSIZE; 351 if (status >= 0)
352 status = -EREMOTEIO;
350 break; 353 break;
351 } 354 }
352 m->actual_length += status;
353 status = 0; 355 status = 0;
354 356
355 /* protocol tweaks before next transfer */ 357 /* protocol tweaks before next transfer */