All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sshtylyov-Igf4POYTYCDQT0dZR+AlfA@public.gmane.org>
To: Dave Martin <dave.martin-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Cc: linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	patches-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org,
	Grant Likely
	<grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>,
	Arvid Brodin <arvid.brodin-AM1FMPraTHU@public.gmane.org>,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org
Subject: Re: [PATCH 2/2] isp1760: Fix endianness-sensitivity in of_isp1760_probe()
Date: Wed, 14 Sep 2011 23:12:57 +0400	[thread overview]
Message-ID: <4E70FCB9.4050907@ru.mvista.com> (raw)
In-Reply-To: <1316008633-31009-3-git-send-email-dave.martin-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>

Hello.

On 09/14/2011 05:57 PM, Dave Martin wrote:

> Data read direct from device tree properties will be in the device
> tree's native endianness (i.e., big-endian).

> This patch uses of_property_read_u32() to read the bus-width
> property in host byte order instead.

> Signed-off-by: Dave Martin<dave.martin-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
> Acked-by: Pawel Moll<pawel.moll-5wv7dgnIgG8@public.gmane.org>
> ---
>   drivers/usb/host/isp1760-if.c |    6 +++---
>   1 files changed, 3 insertions(+), 3 deletions(-)

> diff --git a/drivers/usb/host/isp1760-if.c b/drivers/usb/host/isp1760-if.c
> index 69ee32c..fa99c27 100644
> --- a/drivers/usb/host/isp1760-if.c
> +++ b/drivers/usb/host/isp1760-if.c
[...]
> @@ -64,8 +64,8 @@ static int of_isp1760_probe(struct platform_device *dev)
>   		devflags |= ISP1760_FLAG_ISP1761;
>
>   	/* Some systems wire up only 16 of the 32 data lines */
> -	prop = of_get_property(dp, "bus-width", NULL);
> -	if (prop&&  *prop == 16)
> +	of_property_read_u32(dp, "bus-width", bus_width);

    You probably mean '&bus_width'?

> +	if (bus_width == 16)
>   		devflags |= ISP1760_FLAG_BUS_WIDTH_16;
>
>   	if (of_get_property(dp, "port1-otg", NULL) != NULL)

WBR, Sergei
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2011-09-14 19:12 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-14 13:57 [PATCH 0/2] isp1760: Allow device-tree-based probing on non-powerpc architectures Dave Martin
     [not found] ` <1316008633-31009-1-git-send-email-dave.martin-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2011-09-14 13:57   ` [PATCH 1/2] isp1760: Make probing via device tree non-powerpc-specific Dave Martin
     [not found]     ` <1316008633-31009-2-git-send-email-dave.martin-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2011-09-14 14:10       ` Dave Martin
2011-09-14 15:43       ` Grant Likely
2011-09-14 13:57   ` [PATCH 2/2] isp1760: Fix endianness-sensitivity in of_isp1760_probe() Dave Martin
     [not found]     ` <1316008633-31009-3-git-send-email-dave.martin-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2011-09-14 15:46       ` Grant Likely
2011-09-14 19:12       ` Sergei Shtylyov [this message]
     [not found]         ` <4E70FCB9.4050907-hkdhdckH98+B+jHODAdFcQ@public.gmane.org>
2011-09-15  8:53           ` Dave Martin

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=4E70FCB9.4050907@ru.mvista.com \
    --to=sshtylyov-igf4poytycdqt0dzr+alfa@public.gmane.org \
    --cc=arvid.brodin-AM1FMPraTHU@public.gmane.org \
    --cc=dave.martin-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
    --cc=grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org \
    --cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=patches-QSEj5FYQhm4dnm+yROfE0A@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.