Re: [PATCH] fixup! media: i2c: isl7998x: Add driver for Intersil ISL7998x

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Feb 24, 2022 at 05:00:20PM +0100, Michael Tretter wrote:
> Signed-off-by: Michael Tretter <m.tretter@xxxxxxxxxxxxxx>
> ---
>  drivers/media/i2c/isl7998x.c | 12 +++++-------
>  1 file changed, 5 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/media/i2c/isl7998x.c b/drivers/media/i2c/isl7998x.c
> index df124a0b401c..67ff1f508717 100644
> --- a/drivers/media/i2c/isl7998x.c
> +++ b/drivers/media/i2c/isl7998x.c
> @@ -551,12 +551,11 @@ static unsigned int isl7998x_norm_to_val(v4l2_std_id norm)
>  {
>  	unsigned int i;
>  
> -	if (norm == V4L2_STD_UNKNOWN)
> -		return ISL7998X_REG_PX_DEC_SDT_STANDARD_UNKNOWN;
> -
>  	for (i = 0; i < ARRAY_SIZE(isl7998x_std_res); i++)
>  		if (isl7998x_std_res[i].norm & norm)
>  			break;
> +	if (i == ARRAY_SIZE(isl7998x_std_res))
> +		return ISL7998X_REG_PX_DEC_SDT_STANDARD_UNKNOWN;
>  
>  	return isl7998x_std_res[i].id;
>  }
> @@ -565,13 +564,12 @@ static const struct isl7998x_mode *isl7998x_norm_to_mode(v4l2_std_id norm)
>  {
>  	unsigned int i;
>  
> -	/* Use NTSC default resolution during standard detection */
> -	if (norm == V4L2_STD_UNKNOWN)
> -		return &supported_modes[1];
> -
>  	for (i = 0; i < ARRAY_SIZE(isl7998x_std_res); i++)
>  		if (isl7998x_std_res[i].norm & norm)
>  			break;
> +	/* Use NTSC default resolution during standard detection */
> +	if (i == ARRAY_SIZE(isl7998x_std_res))
> +		return &supported_modes[1];
>  
>  	return isl7998x_std_res[i].mode;
>  }

Thanks!

-- 
Sakari Ailus



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux