diff mbox series

[v2,4/4] i2c: core: Remove obsolete members of i2c_adapter and i2c_client

Message ID ddf1ac29-1fe9-4432-be76-574203d185e1@gmail.com
State Superseded
Delegated to: Wolfram Sang
Headers show
Series i2c: Replace lists of special clients with flagging of such clients | expand

Commit Message

Heiner Kallweit Aug. 22, 2024, 7:49 p.m. UTC
After the lists of auto-detected and userspace-created clients have been
removed, we can remove now unused struct members.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
 drivers/i2c/i2c-core-base.c | 2 --
 include/linux/i2c.h         | 6 ------
 2 files changed, 8 deletions(-)

Comments

Wolfram Sang Oct. 8, 2024, 9 a.m. UTC | #1
On Thu, Aug 22, 2024 at 09:49:29PM +0200, Heiner Kallweit wrote:
> After the lists of auto-detected and userspace-created clients have been
> removed, we can remove now unused struct members.
> 
> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>

Why don't you just fold this into patches 2 + 3?
Heiner Kallweit Oct. 8, 2024, 10:59 a.m. UTC | #2
On 08.10.2024 11:00, Wolfram Sang wrote:
> On Thu, Aug 22, 2024 at 09:49:29PM +0200, Heiner Kallweit wrote:
>> After the lists of auto-detected and userspace-created clients have been
>> removed, we can remove now unused struct members.
>>
>> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
> 
> Why don't you just fold this into patches 2 + 3?
> 
I'm always trying to reduce patches with functional changes to a minimum,
hoping this makes review easier. If changes allow for further cleanups,
I typically submit these cleanups as separate patch in the series.
diff mbox series

Patch

diff --git a/drivers/i2c/i2c-core-base.c b/drivers/i2c/i2c-core-base.c
index 15281c58a..e633ca215 100644
--- a/drivers/i2c/i2c-core-base.c
+++ b/drivers/i2c/i2c-core-base.c
@@ -1499,8 +1499,6 @@  static int i2c_register_adapter(struct i2c_adapter *adap)
 	adap->locked_flags = 0;
 	rt_mutex_init(&adap->bus_lock);
 	rt_mutex_init(&adap->mux_lock);
-	mutex_init(&adap->userspace_clients_lock);
-	INIT_LIST_HEAD(&adap->userspace_clients);
 
 	/* Set default timeout to 1 second if not already set */
 	if (adap->timeout == 0)
diff --git a/include/linux/i2c.h b/include/linux/i2c.h
index ba2564fe4..ada90df88 100644
--- a/include/linux/i2c.h
+++ b/include/linux/i2c.h
@@ -313,8 +313,6 @@  struct i2c_driver {
  * @dev: Driver model device node for the slave.
  * @init_irq: IRQ that was set at initialization
  * @irq: indicates the IRQ generated by this device (if any)
- * @detected: member of an i2c_driver.clients list or i2c-core's
- *	userspace_devices list
  * @slave_cb: Callback when I2C slave mode of an adapter is used. The adapter
  *	calls it to pass on slave events to the slave driver.
  * @devres_group_id: id of the devres group that will be created for resources
@@ -345,7 +343,6 @@  struct i2c_client {
 	struct device dev;		/* the device structure		*/
 	int init_irq;			/* irq set at initialization	*/
 	int irq;			/* irq issued by device		*/
-	struct list_head detected;
 #if IS_ENABLED(CONFIG_I2C_SLAVE)
 	i2c_slave_cb_t slave_cb;	/* callback for slave mode	*/
 #endif
@@ -751,9 +748,6 @@  struct i2c_adapter {
 	char name[48];
 	struct completion dev_released;
 
-	struct mutex userspace_clients_lock;
-	struct list_head userspace_clients;
-
 	struct i2c_bus_recovery_info *bus_recovery_info;
 	const struct i2c_adapter_quirks *quirks;