[4/7] media: ov5693: rename clk_rate into xvclk_rate

Message ID 20220615152254.794909-5-tommaso.merciai@amarulasolutions.com
State New
Headers show
Series
  • media: ov5693: cleanup code and add dts support
Related show

Commit Message

Tommaso Merciai June 15, 2022, 3:22 p.m. UTC
Rename u32 clk_rate variable into u32 xvclk_rate, more explicit

Signed-off-by: Tommaso Merciai <tommaso.merciai@amarulasolutions.com>
---
 drivers/media/i2c/ov5693.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Comments

Dario Binacchi June 15, 2022, 3:54 p.m. UTC | #1
Hi Tommaso,
could not be the patch squashed  with the previous ?

Thanks,
Dario

On Wed, Jun 15, 2022 at 5:23 PM Tommaso Merciai
<tommaso.merciai@amarulasolutions.com> wrote:
>
> Rename u32 clk_rate variable into u32 xvclk_rate, more explicit
>
> Signed-off-by: Tommaso Merciai <tommaso.merciai@amarulasolutions.com>
> ---
>  drivers/media/i2c/ov5693.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/media/i2c/ov5693.c b/drivers/media/i2c/ov5693.c
> index e1f9486d7f62..d2adc5513a21 100644
> --- a/drivers/media/i2c/ov5693.c
> +++ b/drivers/media/i2c/ov5693.c
> @@ -1390,7 +1390,7 @@ static int ov5693_check_hwcfg(struct ov5693_device *ov5693)
>  static int ov5693_probe(struct i2c_client *client)
>  {
>         struct ov5693_device *ov5693;
> -       u32 clk_rate;
> +       u32 xvclk_rate;
>         int ret = 0;
>
>         ov5693 = devm_kzalloc(&client->dev, sizeof(*ov5693), GFP_KERNEL);
> @@ -1414,10 +1414,10 @@ static int ov5693_probe(struct i2c_client *client)
>                 return PTR_ERR(ov5693->xvclk);
>         }
>
> -       clk_rate = clk_get_rate(ov5693->xvclk);
> -       if (clk_rate != OV5693_XVCLK_FREQ)
> +       xvclk_rate = clk_get_rate(ov5693->xvclk);
> +       if (xvclk_rate != OV5693_XVCLK_FREQ)
>                 dev_warn(&client->dev, "Found clk freq %u, expected %u\n",
> -                        clk_rate, OV5693_XVCLK_FREQ);
> +                        xvclk_rate, OV5693_XVCLK_FREQ);
>
>         ret = ov5693_configure_gpios(ov5693);
>         if (ret)
> --
> 2.25.1
>
Tommaso Merciai June 15, 2022, 4:06 p.m. UTC | #2
Hi Dario,
On Wed, Jun 15, 2022 at 05:54:38PM +0200, Dario Binacchi wrote:
> Hi Tommaso,
> could not be the patch squashed  with the previous ?

I want separe xvclk clk from rate to be clear.

Thanks for suggestion I'll do it in v2 ;)

Tommaso
> 
> Thanks,
> Dario
> 
> On Wed, Jun 15, 2022 at 5:23 PM Tommaso Merciai
> <tommaso.merciai@amarulasolutions.com> wrote:
> >
> > Rename u32 clk_rate variable into u32 xvclk_rate, more explicit
> >
> > Signed-off-by: Tommaso Merciai <tommaso.merciai@amarulasolutions.com>
> > ---
> >  drivers/media/i2c/ov5693.c | 8 ++++----
> >  1 file changed, 4 insertions(+), 4 deletions(-)
> >
> > diff --git a/drivers/media/i2c/ov5693.c b/drivers/media/i2c/ov5693.c
> > index e1f9486d7f62..d2adc5513a21 100644
> > --- a/drivers/media/i2c/ov5693.c
> > +++ b/drivers/media/i2c/ov5693.c
> > @@ -1390,7 +1390,7 @@ static int ov5693_check_hwcfg(struct ov5693_device *ov5693)
> >  static int ov5693_probe(struct i2c_client *client)
> >  {
> >         struct ov5693_device *ov5693;
> > -       u32 clk_rate;
> > +       u32 xvclk_rate;
> >         int ret = 0;
> >
> >         ov5693 = devm_kzalloc(&client->dev, sizeof(*ov5693), GFP_KERNEL);
> > @@ -1414,10 +1414,10 @@ static int ov5693_probe(struct i2c_client *client)
> >                 return PTR_ERR(ov5693->xvclk);
> >         }
> >
> > -       clk_rate = clk_get_rate(ov5693->xvclk);
> > -       if (clk_rate != OV5693_XVCLK_FREQ)
> > +       xvclk_rate = clk_get_rate(ov5693->xvclk);
> > +       if (xvclk_rate != OV5693_XVCLK_FREQ)
> >                 dev_warn(&client->dev, "Found clk freq %u, expected %u\n",
> > -                        clk_rate, OV5693_XVCLK_FREQ);
> > +                        xvclk_rate, OV5693_XVCLK_FREQ);
> >
> >         ret = ov5693_configure_gpios(ov5693);
> >         if (ret)
> > --
> > 2.25.1
> >
> 
> 
> -- 
> 
> Dario Binacchi
> 
> Embedded Linux Developer
> 
> dario.binacchi@amarulasolutions.com
> 
> __________________________________
> 
> 
> Amarula Solutions SRL
> 
> Via Le Canevare 30, 31100 Treviso, Veneto, IT
> 
> T. +39 042 243 5310
> info@amarulasolutions.com
> 
> www.amarulasolutions.com

Patch

diff --git a/drivers/media/i2c/ov5693.c b/drivers/media/i2c/ov5693.c
index e1f9486d7f62..d2adc5513a21 100644
--- a/drivers/media/i2c/ov5693.c
+++ b/drivers/media/i2c/ov5693.c
@@ -1390,7 +1390,7 @@  static int ov5693_check_hwcfg(struct ov5693_device *ov5693)
 static int ov5693_probe(struct i2c_client *client)
 {
 	struct ov5693_device *ov5693;
-	u32 clk_rate;
+	u32 xvclk_rate;
 	int ret = 0;
 
 	ov5693 = devm_kzalloc(&client->dev, sizeof(*ov5693), GFP_KERNEL);
@@ -1414,10 +1414,10 @@  static int ov5693_probe(struct i2c_client *client)
 		return PTR_ERR(ov5693->xvclk);
 	}
 
-	clk_rate = clk_get_rate(ov5693->xvclk);
-	if (clk_rate != OV5693_XVCLK_FREQ)
+	xvclk_rate = clk_get_rate(ov5693->xvclk);
+	if (xvclk_rate != OV5693_XVCLK_FREQ)
 		dev_warn(&client->dev, "Found clk freq %u, expected %u\n",
-			 clk_rate, OV5693_XVCLK_FREQ);
+			 xvclk_rate, OV5693_XVCLK_FREQ);
 
 	ret = ov5693_configure_gpios(ov5693);
 	if (ret)