diff mbox series

i2c: ljca: Remove unused "target_addr" parameter

Message ID 20240808000042.110722-1-andi.shyti@kernel.org
State Accepted
Delegated to: Andi Shyti
Headers show
Series i2c: ljca: Remove unused "target_addr" parameter | expand

Commit Message

Andi Shyti Aug. 8, 2024, midnight UTC
The stop command doesn't use any address on the target:

  w_packet->data[0] = 0;

and indeed the targed_addr parameter was unused. Remove it.

Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
Cc: Wentong Wu <wentong.wu@intel.com>
---
 drivers/i2c/busses/i2c-ljca.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Andi Shyti Sept. 10, 2024, 3:12 p.m. UTC | #1
Hi,

On Thu, Aug 08, 2024 at 01:00:41AM GMT, Andi Shyti wrote:
> The stop command doesn't use any address on the target:
> 
>   w_packet->data[0] = 0;
> 
> and indeed the targed_addr parameter was unused. Remove it.
> 
> Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
> Cc: Wentong Wu <wentong.wu@intel.com>

merged to i2c/i2c-host.

Andi
diff mbox series

Patch

diff --git a/drivers/i2c/busses/i2c-ljca.c b/drivers/i2c/busses/i2c-ljca.c
index 0b70621cf9d33..1dc516ef0fddc 100644
--- a/drivers/i2c/busses/i2c-ljca.c
+++ b/drivers/i2c/busses/i2c-ljca.c
@@ -107,7 +107,7 @@  static int ljca_i2c_start(struct ljca_i2c_dev *ljca_i2c, u8 target_addr,
 	return 0;
 }
 
-static void ljca_i2c_stop(struct ljca_i2c_dev *ljca_i2c, u8 target_addr)
+static void ljca_i2c_stop(struct ljca_i2c_dev *ljca_i2c)
 {
 	struct ljca_i2c_rw_packet *w_packet =
 			(struct ljca_i2c_rw_packet *)ljca_i2c->obuf;
@@ -178,7 +178,7 @@  static int ljca_i2c_read(struct ljca_i2c_dev *ljca_i2c, u8 target_addr, u8 *data
 	if (!ret)
 		ret = ljca_i2c_pure_read(ljca_i2c, data, len);
 
-	ljca_i2c_stop(ljca_i2c, target_addr);
+	ljca_i2c_stop(ljca_i2c);
 
 	return ret;
 }
@@ -222,7 +222,7 @@  static int ljca_i2c_write(struct ljca_i2c_dev *ljca_i2c, u8 target_addr,
 	if (!ret)
 		ret = ljca_i2c_pure_write(ljca_i2c, data, len);
 
-	ljca_i2c_stop(ljca_i2c, target_addr);
+	ljca_i2c_stop(ljca_i2c);
 
 	return ret;
 }