From: Michael Tretter <m.tretter@pengutronix.de>
To: Sakari Ailus <sakari.ailus@linux.intel.com>
Cc: linux-media@vger.kernel.org, devicetree@vger.kernel.org,
Marek Vasut <marex@denx.de>, Rob Herring <robh+dt@kernel.org>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
p.zabel@pengutronix.de, Ian Arkver <ian.arkver.dev@gmail.com>,
kernel@pengutronix.de, Hans Verkuil <hverkuil@xs4all.nl>
Subject: [PATCH] fixup! media: i2c: isl7998x: Add driver for Intersil ISL7998x
Date: Thu, 24 Feb 2022 17:00:20 +0100 [thread overview]
Message-ID: <20220224160020.2630632-1-m.tretter@pengutronix.de> (raw)
In-Reply-To: <YheUuCShBA6jvn8a@paasikivi.fi.intel.com>
Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
---
drivers/media/i2c/isl7998x.c | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/drivers/media/i2c/isl7998x.c b/drivers/media/i2c/isl7998x.c
index df124a0b401c..67ff1f508717 100644
--- a/drivers/media/i2c/isl7998x.c
+++ b/drivers/media/i2c/isl7998x.c
@@ -551,12 +551,11 @@ static unsigned int isl7998x_norm_to_val(v4l2_std_id norm)
{
unsigned int i;
- if (norm == V4L2_STD_UNKNOWN)
- return ISL7998X_REG_PX_DEC_SDT_STANDARD_UNKNOWN;
-
for (i = 0; i < ARRAY_SIZE(isl7998x_std_res); i++)
if (isl7998x_std_res[i].norm & norm)
break;
+ if (i == ARRAY_SIZE(isl7998x_std_res))
+ return ISL7998X_REG_PX_DEC_SDT_STANDARD_UNKNOWN;
return isl7998x_std_res[i].id;
}
@@ -565,13 +564,12 @@ static const struct isl7998x_mode *isl7998x_norm_to_mode(v4l2_std_id norm)
{
unsigned int i;
- /* Use NTSC default resolution during standard detection */
- if (norm == V4L2_STD_UNKNOWN)
- return &supported_modes[1];
-
for (i = 0; i < ARRAY_SIZE(isl7998x_std_res); i++)
if (isl7998x_std_res[i].norm & norm)
break;
+ /* Use NTSC default resolution during standard detection */
+ if (i == ARRAY_SIZE(isl7998x_std_res))
+ return &supported_modes[1];
return isl7998x_std_res[i].mode;
}
--
2.30.2
next prev parent reply other threads:[~2022-02-24 16:00 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-17 15:44 [PATCH v10 0/2] media: i2c: isl7998x: Add driver for Intersil ISL7998x Michael Tretter
2022-02-17 15:44 ` [PATCH v10 1/2] media: dt-bindings: Add Intersil ISL79987 DT bindings Michael Tretter
2022-02-17 15:44 ` [PATCH v10 2/2] media: i2c: isl7998x: Add driver for Intersil ISL7998x Michael Tretter
2022-02-23 11:51 ` Hans Verkuil
2022-02-23 12:16 ` Sakari Ailus
2022-02-23 12:54 ` Sakari Ailus
2022-02-23 13:04 ` Hans Verkuil
2022-02-23 14:18 ` Sakari Ailus
2022-02-24 14:22 ` Sakari Ailus
2022-02-24 16:00 ` Michael Tretter [this message]
2022-02-25 11:06 ` [PATCH] fixup! " Sakari Ailus
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=20220224160020.2630632-1-m.tretter@pengutronix.de \
--to=m.tretter@pengutronix.de \
--cc=devicetree@vger.kernel.org \
--cc=hverkuil@xs4all.nl \
--cc=ian.arkver.dev@gmail.com \
--cc=kernel@pengutronix.de \
--cc=linux-media@vger.kernel.org \
--cc=marex@denx.de \
--cc=mchehab@kernel.org \
--cc=p.zabel@pengutronix.de \
--cc=robh+dt@kernel.org \
--cc=sakari.ailus@linux.intel.com \
/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;
as well as URLs for NNTP newsgroup(s).