@@ -21,6 +21,8 @@
#define OV13858_REG_SOFTWARE_RST 0x0103
#define OV13858_SOFTWARE_RST 0x01
+#define OV13858_MCLK 19200000
+
/* PLL1 generates PCLK and MIPI_PHY_CLK */
#define OV13858_REG_PLL1_CTRL_0 0x0300
#define OV13858_REG_PLL1_CTRL_1 0x0301
@@ -1664,7 +1666,7 @@ static int ov13858_probe(struct i2c_client *client)
u32 val = 0;
device_property_read_u32(&client->dev, "clock-frequency", &val);
- if (val != 19200000)
+ if (val != OV13858_MCLK)
return -EINVAL;
ov13858 = devm_kzalloc(&client->dev, sizeof(*ov13858), GFP_KERNEL);
Defines a macro `OV13858_MCLK` for the clock frequency (19200000 Hz). Replaces the hardcoded clock frequency value in the probe function. Signed-off-by: Sunny Patel <nueralspacetech@gmail.com> --- drivers/media/i2c/ov13858.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)