git://ftp.safe.ca
/
safe
/
jmp
/
linux-2.6
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
spi_s3c24xx: fix transfer setup code
[safe/jmp/linux-2.6]
/
drivers
/
spi
/
spi_s3c24xx.c
diff --git
a/drivers/spi/spi_s3c24xx.c
b/drivers/spi/spi_s3c24xx.c
index
590be85
..
3f3119d
100644
(file)
--- a/
drivers/spi/spi_s3c24xx.c
+++ b/
drivers/spi/spi_s3c24xx.c
@@
-116,6
+116,12
@@
static int s3c24xx_spi_setupxfer(struct spi_device *spi,
bpw = t ? t->bits_per_word : spi->bits_per_word;
hz = t ? t->speed_hz : spi->max_speed_hz;
+ if (!bpw)
+ bpw = 8;
+
+ if (!hz)
+ hz = spi->max_speed_hz;
+
if (bpw != 8) {
dev_err(&spi->dev, "invalid bits-per-word (%d)\n", bpw);
return -EINVAL;