All of lore.kernel.org
 help / color / mirror / Atom feed
From: Florian Fainelli <florian-p3rKhJxN3npAfugRpC6u6w@public.gmane.org>
To: Jonas Gorski <jonas.gorski-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Mark Brown
	<broonie-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>,
	Kevin Cernekee <cernekee-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	stable-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Maxime Bizon <mbizon-MmRyKUhfbQ9GWvitb5QawA@public.gmane.org>,
	spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: Re: [PATCH 3.7] spi/bcm63xx: fix transfer bits_per_words check
Date: Sat, 24 Nov 2012 16:02:24 +0100	[thread overview]
Message-ID: <50B0E180.1020606@openwrt.org> (raw)
In-Reply-To: <1353764690-5961-1-git-send-email-jonas.gorski-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

Le 24/11/2012 14:44, Jonas Gorski a écrit :
> Transfers often do not have bits_per_words set, so use the spi device's
> bits_per_words in this case.
>
> This fixes the driver rejecting valid transfers e.g. generated by
> spi_write() or spi_read().
>
> Cc: stable-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> Signed-off-by: Jonas Gorski <jonas.gorski-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

Acked-by: Florian Fainelli <florian-p3rKhJxN3npAfugRpC6u6w@public.gmane.org>

> ---
>   drivers/spi/spi-bcm63xx.c |    3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/spi/spi-bcm63xx.c b/drivers/spi/spi-bcm63xx.c
> index a9f4049..d7c2916 100644
> --- a/drivers/spi/spi-bcm63xx.c
> +++ b/drivers/spi/spi-bcm63xx.c
> @@ -103,7 +103,8 @@ static int bcm63xx_spi_check_transfer(struct spi_device *spi,
>   {
>   	u8 bits_per_word;
>
> -	bits_per_word = (t) ? t->bits_per_word : spi->bits_per_word;
> +	bits_per_word = (t && t->bits_per_word) ?
> +			t->bits_per_word : spi->bits_per_word;
>   	if (bits_per_word != 8) {
>   		dev_err(&spi->dev, "%s, unsupported bits_per_word=%d\n",
>   			__func__, bits_per_word);
>


------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov

  parent reply	other threads:[~2012-11-24 15:02 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-24 13:44 [PATCH 3.7] spi/bcm63xx: fix transfer bits_per_words check Jonas Gorski
     [not found] ` <1353764690-5961-1-git-send-email-jonas.gorski-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2012-11-24 15:02   ` Florian Fainelli [this message]
     [not found] ` <20121124172801.GC4719@opensource.wolfsonmicro.com>
     [not found]   ` <20121124172801.GC4719-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
2012-11-24 17:53     ` Jonas Gorski
     [not found]       ` <20121124180151.GJ4719@opensource.wolfsonmicro.com>
     [not found]         ` <20121124180151.GJ4719-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
2012-11-24 18:19           ` Jonas Gorski
2012-11-26 13:11             ` Florian Fainelli
2012-11-26 13:23               ` Mark Brown

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=50B0E180.1020606@openwrt.org \
    --to=florian-p3rkhjxn3npafugrpc6u6w@public.gmane.org \
    --cc=broonie-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org \
    --cc=cernekee-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=jonas.gorski-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=mbizon-MmRyKUhfbQ9GWvitb5QawA@public.gmane.org \
    --cc=spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
    --cc=stable-u79uwXL29TY76Z2rM5mHXA@public.gmane.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.