All of lore.kernel.org
 help / color / mirror / Atom feed
From: Robert Jarzmik <robert.jarzmik@free.fr>
To: Mark Rutland <mark.rutland@arm.com>
Cc: "g.liakhovetski@gmx.de" <g.liakhovetski@gmx.de>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-media@vger.kernel.org" <linux-media@vger.kernel.org>
Subject: Re: [PATCH v2 2/2] media: soc_camera: pxa_camera device-tree support
Date: Wed, 25 Jun 2014 21:32:58 +0200	[thread overview]
Message-ID: <878uok9445.fsf@free.fr> (raw)
In-Reply-To: <20140625102801.GA14495@leverpostej> (Mark Rutland's message of "Wed, 25 Jun 2014 11:28:01 +0100")

Mark Rutland <mark.rutland@arm.com> writes:

> On Sat, Jun 21, 2014 at 11:21:47PM +0100, Robert Jarzmik wrote:
>> @@ -1650,6 +1651,64 @@ static struct soc_camera_host_ops pxa_soc_camera_host_ops = {
>>  	.set_bus_param	= pxa_camera_set_bus_param,
>>  };
>>  
>> +static int pxa_camera_pdata_from_dt(struct device *dev,
>> +				    struct pxa_camera_dev *pcdev)
>> +{
>> +	int err = 0;
>> +	struct device_node *np = dev->of_node;
>> +	struct v4l2_of_endpoint ep;
>> +
>> +	err = of_property_read_u32(np, "clock-frequency",
>> +				   (u32 *)&pcdev->mclk);
>
> That cast is either unnecessary or this code is broken.
Mmm maybe ...
As a clock rate is an unsigned long by design, where is the
of_property_read_ulong() function ?

> Use a temporary u32 if the types don't match.
If there's no of_*() function available, let's do that.

-- 
Robert

WARNING: multiple messages have this Message-ID (diff)
From: Robert Jarzmik <robert.jarzmik@free.fr>
To: Mark Rutland <mark.rutland@arm.com>
Cc: "g.liakhovetski\@gmx.de" <g.liakhovetski@gmx.de>,
	"devicetree\@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-media\@vger.kernel.org" <linux-media@vger.kernel.org>
Subject: Re: [PATCH v2 2/2] media: soc_camera: pxa_camera device-tree support
Date: Wed, 25 Jun 2014 21:32:58 +0200	[thread overview]
Message-ID: <878uok9445.fsf@free.fr> (raw)
In-Reply-To: <20140625102801.GA14495@leverpostej> (Mark Rutland's message of "Wed, 25 Jun 2014 11:28:01 +0100")

Mark Rutland <mark.rutland@arm.com> writes:

> On Sat, Jun 21, 2014 at 11:21:47PM +0100, Robert Jarzmik wrote:
>> @@ -1650,6 +1651,64 @@ static struct soc_camera_host_ops pxa_soc_camera_host_ops = {
>>  	.set_bus_param	= pxa_camera_set_bus_param,
>>  };
>>  
>> +static int pxa_camera_pdata_from_dt(struct device *dev,
>> +				    struct pxa_camera_dev *pcdev)
>> +{
>> +	int err = 0;
>> +	struct device_node *np = dev->of_node;
>> +	struct v4l2_of_endpoint ep;
>> +
>> +	err = of_property_read_u32(np, "clock-frequency",
>> +				   (u32 *)&pcdev->mclk);
>
> That cast is either unnecessary or this code is broken.
Mmm maybe ...
As a clock rate is an unsigned long by design, where is the
of_property_read_ulong() function ?

> Use a temporary u32 if the types don't match.
If there's no of_*() function available, let's do that.

-- 
Robert

  reply	other threads:[~2014-06-25 19:32 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-21 22:21 [PATCH v2 1/2] media: soc_camera: pxa_camera documentation device-tree support Robert Jarzmik
2014-06-21 22:21 ` [PATCH v2 2/2] media: soc_camera: pxa_camera " Robert Jarzmik
2014-06-25 10:28   ` Mark Rutland
2014-06-25 19:32     ` Robert Jarzmik [this message]
2014-06-25 19:32       ` Robert Jarzmik
2014-06-25 10:30 ` [PATCH v2 1/2] media: soc_camera: pxa_camera documentation " Mark Rutland
2014-06-25 19:44   ` Robert Jarzmik
2014-06-25 19:44     ` Robert Jarzmik
2014-06-26  9:06     ` Mark Rutland

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=878uok9445.fsf@free.fr \
    --to=robert.jarzmik@free.fr \
    --cc=devicetree@vger.kernel.org \
    --cc=g.liakhovetski@gmx.de \
    --cc=linux-media@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    /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.