From: Lad Prabhakar <prabhakar.csengg@gmail.com>
To: LMML <linux-media@vger.kernel.org>
Cc: lkml <linux-kernel@vger.kernel.org>,
"Lad, Prabhakar" <prabhakar.csengg@gmail.com>
Subject: [PATCH] media: v4l2-core/v4l2-of.c: determine bus_type only on hsync/vsync flags
Date: Tue, 19 May 2015 18:11:23 +0100 [thread overview]
Message-ID: <1432055483-23563-1-git-send-email-prabhakar.csengg@gmail.com> (raw)
From: "Lad, Prabhakar" <prabhakar.csengg@gmail.com>
the bus_type needs to be determined only on the hsync/vsync flags,
this patch fixes the above by moving the check just after hsync/vsync
flags are being set.
Reported-by: Nikhil Devshatwar <nikhil.nd@ti.com>
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
---
drivers/media/v4l2-core/v4l2-of.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/media/v4l2-core/v4l2-of.c b/drivers/media/v4l2-core/v4l2-of.c
index c52fb96..7f89c70 100644
--- a/drivers/media/v4l2-core/v4l2-of.c
+++ b/drivers/media/v4l2-core/v4l2-of.c
@@ -93,6 +93,11 @@ static void v4l2_of_parse_parallel_bus(const struct device_node *node,
flags |= v ? V4L2_MBUS_VSYNC_ACTIVE_HIGH :
V4L2_MBUS_VSYNC_ACTIVE_LOW;
+ if (flags)
+ endpoint->bus_type = V4L2_MBUS_PARALLEL;
+ else
+ endpoint->bus_type = V4L2_MBUS_BT656;
+
if (!of_property_read_u32(node, "pclk-sample", &v))
flags |= v ? V4L2_MBUS_PCLK_SAMPLE_RISING :
V4L2_MBUS_PCLK_SAMPLE_FALLING;
@@ -100,10 +105,6 @@ static void v4l2_of_parse_parallel_bus(const struct device_node *node,
if (!of_property_read_u32(node, "field-even-active", &v))
flags |= v ? V4L2_MBUS_FIELD_EVEN_HIGH :
V4L2_MBUS_FIELD_EVEN_LOW;
- if (flags)
- endpoint->bus_type = V4L2_MBUS_PARALLEL;
- else
- endpoint->bus_type = V4L2_MBUS_BT656;
if (!of_property_read_u32(node, "data-active", &v))
flags |= v ? V4L2_MBUS_DATA_ACTIVE_HIGH :
--
2.1.0
reply other threads:[~2015-05-19 17:11 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1432055483-23563-1-git-send-email-prabhakar.csengg@gmail.com \
--to=prabhakar.csengg@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®