Re: [PATCH net 2/3] i2c: designware: add device private data passing to lock functions

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

 





On 8/23/24 05:02, Jiawen Wu wrote:
In order to add the hardware lock for Wangxun devices with minimal
modification, pass struct dw_i2c_dev to the acquire and release lock
functions.

Cc: stable@xxxxxxxxxxxxxxx
Fixes: 2f8d1ed79345 ("i2c: designware: Add driver support for Wangxun 10Gb NIC")
Signed-off-by: Jiawen Wu <jiawenwu@xxxxxxxxxxxxxx>
---
  drivers/i2c/busses/i2c-designware-amdpsp.c   |  4 ++--
  drivers/i2c/busses/i2c-designware-baytrail.c | 14 ++++++++++++--
  drivers/i2c/busses/i2c-designware-common.c   |  4 ++--
  drivers/i2c/busses/i2c-designware-core.h     |  4 ++--
  4 files changed, 18 insertions(+), 8 deletions(-)

diff --git a/drivers/i2c/busses/i2c-designware-amdpsp.c b/drivers/i2c/busses/i2c-designware-amdpsp.c
index 63454b06e5da..ee7cc4b33f4b 100644
--- a/drivers/i2c/busses/i2c-designware-amdpsp.c
+++ b/drivers/i2c/busses/i2c-designware-amdpsp.c
@@ -167,7 +167,7 @@ static void psp_release_i2c_bus_deferred(struct work_struct *work)
  }
  static DECLARE_DELAYED_WORK(release_queue, psp_release_i2c_bus_deferred);
-static int psp_acquire_i2c_bus(void)
+static int psp_acquire_i2c_bus(struct dw_i2c_dev *dev)
  {
  	int status;

This function is used in a few other places in this compilation unit. You need to update all the users accordingly.

@@ -206,7 +206,7 @@ static int psp_acquire_i2c_bus(void)
  	return 0;
  }
-static void psp_release_i2c_bus(void)
+static void psp_release_i2c_bus(struct dw_i2c_dev *dev)
  {
  	mutex_lock(&psp_i2c_access_mutex);

The same here.

Cheers,

Paolo





[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux