]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
media: ov5640: Remove redundant defines
authorMaxime Ripard <maxime.ripard@bootlin.com>
Mon, 3 Dec 2018 08:44:19 +0000 (03:44 -0500)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Wed, 5 Dec 2018 11:46:44 +0000 (06:46 -0500)
The OV5640_SCLK2X_ROOT_DIVIDER_DEFAULT and OV5640_SCLK_ROOT_DIVIDER_DEFAULT
defines represent exactly the same setup, and are at the same value, than
the more consistent with the rest of the driver OV5640_SCLK2X_ROOT_DIV and
OV5640_SCLK_ROOT_DIV.

Remove them.

Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Tested-by: Adam Ford <aford173@gmail.com> #imx6dq
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/i2c/ov5640.c

index 588b98e2e99fc9f9e99f10b9e6b1fee42fb6fe9c..7c18120aabd1e601fd87a8cd82e52a610d6626f5 100644 (file)
@@ -95,9 +95,6 @@
 #define OV5640_REG_SDE_CTRL5           0x5585
 #define OV5640_REG_AVG_READOUT         0x56a1
 
-#define OV5640_SCLK2X_ROOT_DIVIDER_DEFAULT     1
-#define OV5640_SCLK_ROOT_DIVIDER_DEFAULT       2
-
 enum ov5640_mode_id {
        OV5640_MODE_QCIF_176_144 = 0,
        OV5640_MODE_QVGA_320_240,
@@ -2086,8 +2083,8 @@ static int ov5640_restore_mode(struct ov5640_dev *sensor)
        sensor->last_mode = &ov5640_mode_init_data;
 
        ret = ov5640_mod_reg(sensor, OV5640_REG_SYS_ROOT_DIVIDER, 0x3f,
-                            (ilog2(OV5640_SCLK2X_ROOT_DIVIDER_DEFAULT) << 2) |
-                            ilog2(OV5640_SCLK_ROOT_DIVIDER_DEFAULT));
+                            (ilog2(OV5640_SCLK2X_ROOT_DIV) << 2) |
+                            ilog2(OV5640_SCLK_ROOT_DIV));
        if (ret)
                return ret;