diff mbox series

adv748x: Only set i2c addresses once during probe

Message ID 20201122163048.3587032-1-niklas.soderlund+renesas@ragnatech.se (mailing list archive)
State Mainlined
Commit 4deff542d70aa8ffe83cf6de0e14b4e0cb24b95b
Delegated to: Kieran Bingham
Headers show
Series adv748x: Only set i2c addresses once during probe | expand

Commit Message

Niklas Söderlund Nov. 22, 2020, 4:30 p.m. UTC
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.

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
---
 drivers/media/i2c/adv748x/adv748x-core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Kieran Bingham Nov. 25, 2020, 12:07 p.m. UTC | #1
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@ideasonboard.com>


> Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
> ---
>  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;
>  }
>  
>  /**
>
diff mbox series

Patch

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;
 }
 
 /**