From: Eugen Hristev <ehristev@kernel.org>
To: Leon Luo <leonl@leopardimaging.com>,
Sakari Ailus <sakari.ailus@linux.intel.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
Eugen Hristev <ehristev@kernel.org>
Subject: [PATCH] media: i2c: imx274: trivial cleanup
Date: Tue, 19 May 2026 23:00:30 +0300 [thread overview]
Message-ID: <20260519-imx274-v1-1-a7b78ae0db46@kernel.org> (raw)
Fix some typos, removed superfluous comments/code,
some minor code alignment.
Signed-off-by: Eugen Hristev <ehristev@kernel.org>
---
drivers/media/i2c/imx274.c | 20 +++++++-------------
1 file changed, 7 insertions(+), 13 deletions(-)
diff --git a/drivers/media/i2c/imx274.c b/drivers/media/i2c/imx274.c
index 241821572e03..bf38001272d7 100644
--- a/drivers/media/i2c/imx274.c
+++ b/drivers/media/i2c/imx274.c
@@ -182,7 +182,7 @@ struct imx274_mode {
};
/*
- * imx274 test pattern related structure
+ * imx274 test pattern related enum
*/
enum {
TEST_PATTERN_DISABLED = 0,
@@ -533,7 +533,7 @@ static const struct imx274_mode imx274_modes[] = {
/*
* struct imx274_ctrls - imx274 ctrl structure
* @handler: V4L2 ctrl handler structure
- * @exposure: Pointer to expsure ctrl structure
+ * @exposure: Pointer to exposure ctrl structure
* @gain: Pointer to gain ctrl structure
* @vflip: Pointer to vflip ctrl structure
* @test_pattern: Pointer to test pattern ctrl structure
@@ -547,7 +547,7 @@ struct imx274_ctrls {
};
/*
- * struct stim274 - imx274 device structure
+ * struct stimx274 - imx274 device structure
* @sd: V4L2 subdevice structure
* @pad: Media pad structure
* @client: Pointer to I2C client
@@ -587,9 +587,6 @@ struct stimx274 {
? rounddown((dim), (step)) \
: rounddown((dim) + (step) / 2, (step))))
-/*
- * Function declaration
- */
static int imx274_set_gain(struct stimx274 *priv, struct v4l2_ctrl *ctrl);
static int imx274_set_exposure(struct stimx274 *priv, int val);
static int imx274_set_vflip(struct stimx274 *priv, int val);
@@ -640,9 +637,9 @@ static int imx274_write_table(struct stimx274 *priv, const struct reg_8 table[])
for (next = table;; next++) {
if ((next->addr != range_start + range_count) ||
- (next->addr == IMX274_TABLE_END) ||
- (next->addr == IMX274_TABLE_WAIT_MS) ||
- (range_count == max_range_vals)) {
+ next->addr == IMX274_TABLE_END ||
+ next->addr == IMX274_TABLE_WAIT_MS ||
+ range_count == max_range_vals) {
if (range_count == 1)
err = regmap_write(regmap,
range_start, range_vals[0]);
@@ -650,8 +647,6 @@ static int imx274_write_table(struct stimx274 *priv, const struct reg_8 table[])
err = regmap_bulk_write(regmap, range_start,
&range_vals[0],
range_count);
- else
- err = 0;
if (err)
return err;
@@ -1960,7 +1955,6 @@ static int imx274_probe(struct i2c_client *client)
struct device *dev = &client->dev;
int ret;
- /* initialize imx274 */
imx274 = devm_kzalloc(dev, sizeof(*imx274), GFP_KERNEL);
if (!imx274)
return -ENOMEM;
@@ -2125,7 +2119,7 @@ static const struct dev_pm_ops imx274_pm_ops = {
static struct i2c_driver imx274_i2c_driver = {
.driver = {
- .name = DRIVER_NAME,
+ .name = DRIVER_NAME,
.pm = &imx274_pm_ops,
.of_match_table = imx274_of_id_table,
},
---
base-commit: e98d21c170b01ddef366f023bbfcf6b31509fa83
change-id: 20260519-imx274-e393012aa553
Best regards,
--
Eugen Hristev <ehristev@kernel.org>
reply other threads:[~2026-05-19 20:00 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=20260519-imx274-v1-1-a7b78ae0db46@kernel.org \
--to=ehristev@kernel.org \
--cc=leonl@leopardimaging.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@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
all inboxes | Powered by JetHome®