mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Paul Fertser <fercerpav@gmail.com>
To: barebox@lists.infradead.org
Subject: [RFC][PATCH 2/3] spi: enfore default bits_per_word value
Date: Mon, 29 Aug 2011 16:39:53 +0400	[thread overview]
Message-ID: <adfb6d53873eef4cb092b80728c7afed13224d08.1314683390.git.fercerpav@gmail.com> (raw)
In-Reply-To: <3c2cf8578f00f7200d39dc396856cb8a63e48d4d.1314683390.git.fercerpav@gmail.com>

Documentation says it should default to 8 when not specified
explicitly by the device data.

Signed-off-by: Paul Fertser <fercerpav@gmail.com>
---
 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 82393ea..7a8aed4 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;
-- 
1.5.2.2


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2011-08-30  5:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-29 12:25 [RFC][PATCH 1/3] spi: let master a chance to setup device before registering it Paul Fertser
2011-08-29 12:39 ` Paul Fertser [this message]
2011-08-30  5:39 ` [RFC][PATCH 3/3] spi: indicate in the docs that per-transfer bpw setting is not supported Paul Fertser

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=adfb6d53873eef4cb092b80728c7afed13224d08.1314683390.git.fercerpav@gmail.com \
    --to=fercerpav@gmail.com \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox