Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 176181
b: refs/heads/master
c: 04ba24b
h: refs/heads/master
i:
  176179: 81decfb
v: v3
  • Loading branch information
Jan Nikitenko authored and Grant Likely committed Dec 9, 2009
1 parent 946f086 commit e185a64
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b3a08945166adc8515a8c7927fbf0df264db5b63
refs/heads/master: 04ba24b34ac8ea4885295a7f7f78f719bc8c859b
10 changes: 8 additions & 2 deletions trunk/drivers/spi/au1550_spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,14 @@ static int au1550_spi_setupxfer(struct spi_device *spi, struct spi_transfer *t)
unsigned bpw, hz;
u32 cfg, stat;

bpw = t ? t->bits_per_word : spi->bits_per_word;
hz = t ? t->speed_hz : spi->max_speed_hz;
bpw = spi->bits_per_word;
hz = spi->max_speed_hz;
if (t) {
if (t->bits_per_word)
bpw = t->bits_per_word;
if (t->speed_hz)
hz = t->speed_hz;
}

if (bpw < 4 || bpw > 24) {
dev_err(&spi->dev, "setupxfer: invalid bits_per_word=%d\n",
Expand Down

0 comments on commit e185a64

Please sign in to comment.