diff options
author | Ingo Molnar <mingo@kernel.org> | 2015-05-19 09:37:30 +0300 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2015-05-19 09:37:30 +0300 |
commit | a22ae718067c233af790b8690b3d8f6190859ead (patch) | |
tree | 2e96c72b4b231f9302f0000a8702e4f21456e90b /drivers/spi/spi-bcm2835.c | |
parent | 58ac93e4f2e4b15beffdf0e3749b7fea3208ef66 (diff) | |
parent | e26081808edadfd257c6c9d81014e3b25e9a6118 (diff) | |
download | linux-a22ae718067c233af790b8690b3d8f6190859ead.tar.xz |
Merge tag 'v4.1-rc4' into sched/core, before applying new patches
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'drivers/spi/spi-bcm2835.c')
-rw-r--r-- | drivers/spi/spi-bcm2835.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/spi/spi-bcm2835.c b/drivers/spi/spi-bcm2835.c index f63864a893c5..37875cf942f7 100644 --- a/drivers/spi/spi-bcm2835.c +++ b/drivers/spi/spi-bcm2835.c @@ -164,13 +164,12 @@ static int bcm2835_spi_transfer_one_poll(struct spi_master *master, unsigned long xfer_time_us) { struct bcm2835_spi *bs = spi_master_get_devdata(master); - unsigned long timeout = jiffies + - max(4 * xfer_time_us * HZ / 1000000, 2uL); + /* set timeout to 1 second of maximum polling */ + unsigned long timeout = jiffies + HZ; /* enable HW block without interrupts */ bcm2835_wr(bs, BCM2835_SPI_CS, cs | BCM2835_SPI_CS_TA); - /* set timeout to 4x the expected time, or 2 jiffies */ /* loop until finished the transfer */ while (bs->rx_len) { /* read from fifo as much as possible */ |