]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
media: i2c: imx274: trivial cleanup
authorEugen Hristev <ehristev@kernel.org>
Tue, 19 May 2026 20:00:30 +0000 (23:00 +0300)
committerSakari Ailus <sakari.ailus@linux.intel.com>
Wed, 20 May 2026 11:28:38 +0000 (14:28 +0300)
Fix some typos, removed superfluous comments/code,
some minor code alignment.

Signed-off-by: Eugen Hristev <ehristev@kernel.org>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
drivers/media/i2c/imx274.c

index 882dc2e9dd8f2e4ae5567056726df051f2d0b59e..76da647f9cf969a04703b6ef76c0178a84be5f4a 100644 (file)
@@ -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,
        },