diff options
author | Ulrich Hecht <ulrich.hecht+renesas@gmail.com> | 2016-09-22 10:19:00 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2016-10-24 17:35:17 -0200 |
commit | c57a68a152dc7e2d0631acb9d3c00d1c33ddecfb (patch) | |
tree | 1fb01b7421fdf94b22e6fd7ddb0646c4699af5fd /drivers/media/i2c | |
parent | f59d4418c420ac3d6bb896228317168f790f489b (diff) | |
download | linux-c57a68a152dc7e2d0631acb9d3c00d1c33ddecfb.tar.gz linux-c57a68a152dc7e2d0631acb9d3c00d1c33ddecfb.tar.bz2 linux-c57a68a152dc7e2d0631acb9d3c00d1c33ddecfb.zip |
[media] media: adv7604: automatic "default-input" selection
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>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/i2c')
-rw-r--r-- | drivers/media/i2c/adv7604.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/media/i2c/adv7604.c b/drivers/media/i2c/adv7604.c index 4003831de712..fa7046ef09b2 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) |