diff mbox

[2/3] smiapp: Read link-frequencies property from the endpoint node

Message ID 1425950282-30548-3-git-send-email-sakari.ailus@iki.fi (mailing list archive)
State New, archived
Headers show

Commit Message

Sakari Ailus March 10, 2015, 1:18 a.m. UTC
The documentation stated that the link-frequencies property belongs to the
endpoint node, not to the device's of_node. Fix this.

There are no DT board descriptions using the driver yet, so a fix in the
driver is sufficient.

Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
---
 drivers/media/i2c/smiapp/smiapp-core.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

Comments

Laurent Pinchart March 11, 2015, 6:41 p.m. UTC | #1
Hi Sakari,

Thank you for the patch.

On Tuesday 10 March 2015 03:18:01 Sakari Ailus wrote:
> The documentation stated that the link-frequencies property belongs to the
> endpoint node, not to the device's of_node. Fix this.
> 
> There are no DT board descriptions using the driver yet, so a fix in the
> driver is sufficient.
> 
> Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>

Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> ---
>  drivers/media/i2c/smiapp/smiapp-core.c |    5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/media/i2c/smiapp/smiapp-core.c
> b/drivers/media/i2c/smiapp/smiapp-core.c index 565a00c..ecae76b 100644
> --- a/drivers/media/i2c/smiapp/smiapp-core.c
> +++ b/drivers/media/i2c/smiapp/smiapp-core.c
> @@ -3022,8 +3022,7 @@ static struct smiapp_platform_data
> *smiapp_get_pdata(struct device *dev) dev_dbg(dev, "reset %d, nvm %d, clk
> %d, csi %d\n", pdata->xshutdown, pdata->nvm_size, pdata->ext_clk,
> pdata->csi_signalling_mode);
> 
> -	rval = of_get_property(
> -		dev->of_node, "link-frequencies", &asize) ? 0 : -ENOENT;
> +	rval = of_get_property(ep, "link-frequencies", &asize) ? 0 : -ENOENT;
>  	if (rval) {
>  		dev_warn(dev, "can't get link-frequencies array size\n");
>  		goto out_err;
> @@ -3037,7 +3036,7 @@ static struct smiapp_platform_data
> *smiapp_get_pdata(struct device *dev)
> 
>  	asize /= sizeof(*pdata->op_sys_clock);
>  	rval = of_property_read_u64_array(
> -		dev->of_node, "link-frequencies", pdata->op_sys_clock, asize);
> +		ep, "link-frequencies", pdata->op_sys_clock, asize);
>  	if (rval) {
>  		dev_warn(dev, "can't get link-frequencies\n");
>  		goto out_err;
Lad, Prabhakar March 11, 2015, 10:25 p.m. UTC | #2
Hi Sakari,

Thanks for the patch.

On Tue, Mar 10, 2015 at 1:18 AM, Sakari Ailus <sakari.ailus@iki.fi> wrote:
> The documentation stated that the link-frequencies property belongs to the
> endpoint node, not to the device's of_node. Fix this.
>
> There are no DT board descriptions using the driver yet, so a fix in the
> driver is sufficient.
>
> Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>

Tested-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>

Cheers,
--Prabhakar Lad

> ---
>  drivers/media/i2c/smiapp/smiapp-core.c |    5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/media/i2c/smiapp/smiapp-core.c b/drivers/media/i2c/smiapp/smiapp-core.c
> index 565a00c..ecae76b 100644
> --- a/drivers/media/i2c/smiapp/smiapp-core.c
> +++ b/drivers/media/i2c/smiapp/smiapp-core.c
> @@ -3022,8 +3022,7 @@ static struct smiapp_platform_data *smiapp_get_pdata(struct device *dev)
>         dev_dbg(dev, "reset %d, nvm %d, clk %d, csi %d\n", pdata->xshutdown,
>                 pdata->nvm_size, pdata->ext_clk, pdata->csi_signalling_mode);
>
> -       rval = of_get_property(
> -               dev->of_node, "link-frequencies", &asize) ? 0 : -ENOENT;
> +       rval = of_get_property(ep, "link-frequencies", &asize) ? 0 : -ENOENT;
>         if (rval) {
>                 dev_warn(dev, "can't get link-frequencies array size\n");
>                 goto out_err;
> @@ -3037,7 +3036,7 @@ static struct smiapp_platform_data *smiapp_get_pdata(struct device *dev)
>
>         asize /= sizeof(*pdata->op_sys_clock);
>         rval = of_property_read_u64_array(
> -               dev->of_node, "link-frequencies", pdata->op_sys_clock, asize);
> +               ep, "link-frequencies", pdata->op_sys_clock, asize);
>         if (rval) {
>                 dev_warn(dev, "can't get link-frequencies\n");
>                 goto out_err;
> --
> 1.7.10.4
>
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Lad, Prabhakar March 11, 2015, 10:38 p.m. UTC | #3
On Wed, Mar 11, 2015 at 10:25 PM, Lad, Prabhakar
<prabhakar.csengg@gmail.com> wrote:
> Hi Sakari,
>
> Thanks for the patch.
>
> On Tue, Mar 10, 2015 at 1:18 AM, Sakari Ailus <sakari.ailus@iki.fi> wrote:
>> The documentation stated that the link-frequencies property belongs to the
>> endpoint node, not to the device's of_node. Fix this.
>>
>> There are no DT board descriptions using the driver yet, so a fix in the
>> driver is sufficient.
>>
>> Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
>
> Tested-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
>

I meant :
Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>

Cheers,
--Prabhakar Lad
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/media/i2c/smiapp/smiapp-core.c b/drivers/media/i2c/smiapp/smiapp-core.c
index 565a00c..ecae76b 100644
--- a/drivers/media/i2c/smiapp/smiapp-core.c
+++ b/drivers/media/i2c/smiapp/smiapp-core.c
@@ -3022,8 +3022,7 @@  static struct smiapp_platform_data *smiapp_get_pdata(struct device *dev)
 	dev_dbg(dev, "reset %d, nvm %d, clk %d, csi %d\n", pdata->xshutdown,
 		pdata->nvm_size, pdata->ext_clk, pdata->csi_signalling_mode);
 
-	rval = of_get_property(
-		dev->of_node, "link-frequencies", &asize) ? 0 : -ENOENT;
+	rval = of_get_property(ep, "link-frequencies", &asize) ? 0 : -ENOENT;
 	if (rval) {
 		dev_warn(dev, "can't get link-frequencies array size\n");
 		goto out_err;
@@ -3037,7 +3036,7 @@  static struct smiapp_platform_data *smiapp_get_pdata(struct device *dev)
 
 	asize /= sizeof(*pdata->op_sys_clock);
 	rval = of_property_read_u64_array(
-		dev->of_node, "link-frequencies", pdata->op_sys_clock, asize);
+		ep, "link-frequencies", pdata->op_sys_clock, asize);
 	if (rval) {
 		dev_warn(dev, "can't get link-frequencies\n");
 		goto out_err;