All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
To: hans.verkuil@cisco.com
Cc: niklas.soderlund@ragnatech.se, linux-media@vger.kernel.org,
	linux-renesas-soc@vger.kernel.org, magnus.damm@gmail.com,
	ulrich.hecht+renesas@gmail.com,
	laurent.pinchart@ideasonboard.com, william.towle@codethink.co.uk,
	devicetree@vger.kernel.org, radhey.shyam.pandey@xilinx.com
Subject: [PATCH v2 2/2] media: adv7604: automatic "default-input" selection
Date: Thu, 22 Sep 2016 15:19:00 +0200	[thread overview]
Message-ID: <1474550340-31455-3-git-send-email-ulrich.hecht+renesas@gmail.com> (raw)
In-Reply-To: <1474550340-31455-1-git-send-email-ulrich.hecht+renesas@gmail.com>

Documentation states that the "default-input" property should reside
directly in the node of the device.  This adjusts the parsing to make the
implementation consistent with the documentation.

Based on patch by William Towle <william.towle@codethink.co.uk>.

Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
---
 drivers/media/i2c/adv7604.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/media/i2c/adv7604.c b/drivers/media/i2c/adv7604.c
index 4003831..fa7046e 100644
--- a/drivers/media/i2c/adv7604.c
+++ b/drivers/media/i2c/adv7604.c
@@ -3074,13 +3074,13 @@ static int adv76xx_parse_dt(struct adv76xx_state *state)
 		return ret;
 	}
 
-	if (!of_property_read_u32(endpoint, "default-input", &v))
+	of_node_put(endpoint);
+
+	if (!of_property_read_u32(np, "default-input", &v))
 		state->pdata.default_input = v;
 	else
 		state->pdata.default_input = -1;
 
-	of_node_put(endpoint);
-
 	flags = bus_cfg.bus.parallel.flags;
 
 	if (flags & V4L2_MBUS_HSYNC_ACTIVE_HIGH)
-- 
2.7.4

  parent reply	other threads:[~2016-09-22 13:19 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-22 13:18 [PATCH v2 0/2] media: adv7604: fix default-input property inconsistencies Ulrich Hecht
     [not found] ` <1474550340-31455-1-git-send-email-ulrich.hecht+renesas-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-09-22 13:18   ` [PATCH v2 1/2] media: adv7604: fix bindings inconsistency for default-input Ulrich Hecht
2016-09-22 13:18     ` Ulrich Hecht
2016-09-23 20:03     ` Rob Herring
2016-09-22 13:19 ` Ulrich Hecht [this message]
2016-09-26  8:31   ` [PATCH v2 2/2] media: adv7604: automatic "default-input" selection Laurent Pinchart

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=1474550340-31455-3-git-send-email-ulrich.hecht+renesas@gmail.com \
    --to=ulrich.hecht+renesas@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=hans.verkuil@cisco.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=magnus.damm@gmail.com \
    --cc=niklas.soderlund@ragnatech.se \
    --cc=radhey.shyam.pandey@xilinx.com \
    --cc=william.towle@codethink.co.uk \
    /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.