Thread (3 messages) 3 messages, 2 authors, 2016-09-26

Re: [PATCH v2 2/2] media: adv7604: automatic "default-input" selection

From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Date: 2016-09-26 08:31:04
Also in: linux-media, linux-renesas-soc

Hi Ulrich,

Thank you for the patch.

On Thursday 22 Sep 2016 15:19:00 Ulrich Hecht wrote:
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 [off-list ref].

Signed-off-by: Ulrich Hecht <redacted>
Signed-off-by: Hans Verkuil <redacted>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
quoted hunk ↗ jump to hunk
---
 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)
-- 
Regards,

Laurent Pinchart
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help