Re: [PATCH] adv748x: Only set i2c addresses once during probe

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

 



Hi Niklas,

On 22/11/2020 16:30, Niklas Söderlund wrote:
> During probe the i2c slave addresses are set two times in a row, once in
> adv748x_initialise_clients() and once directly after in adv748x_reset().
> Remove the call to adv748x_set_slave_addresses() in
> adv748x_initialise_clients() as it's only called during probe while
> adv748x_reset() is called during probe and normal operation.

Yes, and the call to reset will completely reset the first setting in
the first place - so it's quite redundant.

Reviewed-by: Kieran Bingham <kieran.bingham+renesas@xxxxxxxxxxxxxxxx>


> Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@xxxxxxxxxxxx>
> ---
>  drivers/media/i2c/adv748x/adv748x-core.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/media/i2c/adv748x/adv748x-core.c b/drivers/media/i2c/adv748x/adv748x-core.c
> index ae8b7ebf3830aa1c..00966fe104881a14 100644
> --- a/drivers/media/i2c/adv748x/adv748x-core.c
> +++ b/drivers/media/i2c/adv748x/adv748x-core.c
> @@ -198,7 +198,7 @@ static int adv748x_initialise_clients(struct adv748x_state *state)
>  			return ret;
>  	}
>  
> -	return adv748x_set_slave_addresses(state);
> +	return 0;
>  }
>  
>  /**
> 




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux