diff options
author | Paul Fertser <fercerpav@gmail.com> | 2011-08-29 16:39:53 +0400 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2011-09-29 12:27:32 +0200 |
commit | 686bd976a6bec926b020aeb769651180bd545c0a (patch) | |
tree | ec80b4c7db86d146775c23fa0f3ad558985f56ef | |
parent | 67f2dcc0d75c65386ae53a9b00373d6750083df9 (diff) | |
download | barebox-686bd976a6bec926b020aeb769651180bd545c0a.tar.gz barebox-686bd976a6bec926b020aeb769651180bd545c0a.tar.xz |
spi: enfore default bits_per_word value
Documentation says it should default to 8 when not specified
explicitly by the device data.
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r-- | drivers/spi/spi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index 82393ea47f..7a8aed42e2 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c @@ -75,7 +75,7 @@ struct spi_device *spi_new_device(struct spi_master *master, proxy->chip_select = chip->chip_select; proxy->max_speed_hz = chip->max_speed_hz; proxy->mode = chip->mode; - proxy->bits_per_word = chip->bits_per_word; + proxy->bits_per_word = chip->bits_per_word ? chip->bits_per_word : 8; proxy->dev.platform_data = chip->platform_data; strcpy(proxy->dev.name, chip->name); proxy->dev.type_data = proxy; |