diff mbox series

[1/1] media: ov5640: set correct default link frequency

Message ID 20221125063816.2728786-1-guoniu.zhou@nxp.com (mailing list archive)
State New, archived
Headers show
Series [1/1] media: ov5640: set correct default link frequency | expand

Commit Message

G.N. Zhou Nov. 25, 2022, 6:38 a.m. UTC
current_link_freq field in ov5640_dev structrue is link frequency,
not link frequency array index, so correct it.

Fixes: 3c28588f35d3 ("media: ov5640: Update pixel_rate and link_freq")

Signed-off-by: Guoniu.zhou <guoniu.zhou@nxp.com>
---
 drivers/media/i2c/ov5640.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Jacopo Mondi Nov. 25, 2022, 8:23 a.m. UTC | #1
Hello Guoniu,

On Fri, Nov 25, 2022 at 02:38:16PM +0800, Guoniu.zhou wrote:
> current_link_freq field in ov5640_dev structrue is link frequency,

s/structrue/structure

> not link frequency array index, so correct it.
>
> Fixes: 3c28588f35d3 ("media: ov5640: Update pixel_rate and link_freq")
>
> Signed-off-by: Guoniu.zhou <guoniu.zhou@nxp.com>

Ah, right! it's the frequecy not the index

This -should- be harmless as current_link_freq is re-calculated anyway
at the first s_fmt() but it's indeed worth fixing.

Acked-by: Jacopo Mondi <jacopo@jmondi.org>

Thanks
   j

> ---
>  drivers/media/i2c/ov5640.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/media/i2c/ov5640.c b/drivers/media/i2c/ov5640.c
> index 2d740397a5d4..3f6d715efa82 100644
> --- a/drivers/media/i2c/ov5640.c
> +++ b/drivers/media/i2c/ov5640.c
> @@ -3817,7 +3817,8 @@ static int ov5640_probe(struct i2c_client *client)
>  	sensor->current_mode =
>  		&ov5640_mode_data[OV5640_MODE_VGA_640_480];
>  	sensor->last_mode = sensor->current_mode;
> -	sensor->current_link_freq = OV5640_DEFAULT_LINK_FREQ;
> +	sensor->current_link_freq =
> +		ov5640_csi2_link_freqs[OV5640_DEFAULT_LINK_FREQ];
>
>  	sensor->ae_target = 52;
>
> --
> 2.37.1
>
G.N. Zhou Nov. 25, 2022, 8:36 a.m. UTC | #2
Hi Jacopo Mondi,

Thanks your replying and I will correct the typo.

> -----Original Message-----
> From: Jacopo Mondi <jacopo@jmondi.org>
> Sent: 2022年11月25日 16:23
> To: G.N. Zhou <guoniu.zhou@nxp.com>
> Cc: linux-media@vger.kernel.org; slongerbeam@gmail.com;
> mchehab@kernel.org; sakari.ailus@linux.intel.com; hugues.fruchet@st.com;
> laurent.pinchart@ideasonboard.com
> Subject: [EXT] Re: [PATCH 1/1] media: ov5640: set correct default link frequency
> 
> Caution: EXT Email
> 
> Hello Guoniu,
> 
> On Fri, Nov 25, 2022 at 02:38:16PM +0800, Guoniu.zhou wrote:
> > current_link_freq field in ov5640_dev structrue is link frequency,
> 
> s/structrue/structure
> 
> > not link frequency array index, so correct it.
> >
> > Fixes: 3c28588f35d3 ("media: ov5640: Update pixel_rate and link_freq")
> >
> > Signed-off-by: Guoniu.zhou <guoniu.zhou@nxp.com>
> 
> Ah, right! it's the frequecy not the index
> 
> This -should- be harmless as current_link_freq is re-calculated anyway at the first
> s_fmt() but it's indeed worth fixing.
> 
> Acked-by: Jacopo Mondi <jacopo@jmondi.org>
> 
> Thanks
>    j
> 
> > ---
> >  drivers/media/i2c/ov5640.c | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/media/i2c/ov5640.c b/drivers/media/i2c/ov5640.c
> > index 2d740397a5d4..3f6d715efa82 100644
> > --- a/drivers/media/i2c/ov5640.c
> > +++ b/drivers/media/i2c/ov5640.c
> > @@ -3817,7 +3817,8 @@ static int ov5640_probe(struct i2c_client *client)
> >       sensor->current_mode =
> >               &ov5640_mode_data[OV5640_MODE_VGA_640_480];
> >       sensor->last_mode = sensor->current_mode;
> > -     sensor->current_link_freq = OV5640_DEFAULT_LINK_FREQ;
> > +     sensor->current_link_freq =
> > +             ov5640_csi2_link_freqs[OV5640_DEFAULT_LINK_FREQ];
> >
> >       sensor->ae_target = 52;
> >
> > --
> > 2.37.1
> >
diff mbox series

Patch

diff --git a/drivers/media/i2c/ov5640.c b/drivers/media/i2c/ov5640.c
index 2d740397a5d4..3f6d715efa82 100644
--- a/drivers/media/i2c/ov5640.c
+++ b/drivers/media/i2c/ov5640.c
@@ -3817,7 +3817,8 @@  static int ov5640_probe(struct i2c_client *client)
 	sensor->current_mode =
 		&ov5640_mode_data[OV5640_MODE_VGA_640_480];
 	sensor->last_mode = sensor->current_mode;
-	sensor->current_link_freq = OV5640_DEFAULT_LINK_FREQ;
+	sensor->current_link_freq =
+		ov5640_csi2_link_freqs[OV5640_DEFAULT_LINK_FREQ];
 
 	sensor->ae_target = 52;