Skip to contentSkip to conversation

i2c: Mark i2c_adapter.id as deprecated

PATCH In review Jean Delvare 4 participants 4 messages Nov 5, 2010 – Nov 13, 2010 1 message not in the archive

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 3/3 i2c: Mark i2c_adapter.id as deprecated

It's about time to make it clear that i2c_adapter.id is deprecated. Hopefully this will remind the last user to move over to a different strategy.

Cc Hans Verkuil <[email protected]>
Cc Jarod Wilson <[email protected]>
---
 drivers/i2c/i2c-mux.c |    1 -
 include/linux/i2c.h   |    2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)
include/linux/i2c.h +1 -1
@@ -353,7 +353,7 @@ struct i2c_algorithm {
  */
 struct i2c_adapter {
 	struct module *owner;
-	unsigned int id;
+	unsigned int id __deprecated;
 	unsigned int class;		  /* classes to allow probing for */
 	const struct i2c_algorithm *algo; /* the algorithm to access the bus */
 	void *algo_data;
drivers/i2c/i2c-mux.c +0 -1
@@ -120,7 +120,6 @@ struct i2c_adapter *i2c_add_mux_adapter(
 	snprintf(priv->adap.name, sizeof(priv->adap.name),
 		 "i2c-%d-mux (chan_id %d)", i2c_adapter_id(parent), chan_id);
 	priv->adap.owner = THIS_MODULE;
-	priv->adap.id = parent->id;
 	priv->adap.algo = &priv->algo;
 	priv->adap.algo_data = priv;
 	priv->adap.dev.parent = &parent->dev;
Signature · 1 line
Jean Delvare

A message that is not in the archive (sent off-list or not yet received): [email protected]

#3 lore raw

Em 05-11-2010 18:10, Jean Delvare escreveu:

Quoted 7 lines

It's about time to make it clear that i2c_adapter.id is deprecated. Hopefully this will remind the last user to move over to a different strategy.

Cc Hans Verkuil <hverkuil-qWit8jRvyhVmR6Xm/[email protected]>
Cc Jarod Wilson <[email protected]>
Quoted 28 lines
---
 drivers/i2c/i2c-mux.c |    1 -
 include/linux/i2c.h   |    2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)
include/linux/i2c.h +1 -1
@@ -353,7 +353,7 @@ struct i2c_algorithm {
  */
 struct i2c_adapter {
 	struct module *owner;
-	unsigned int id;
+	unsigned int id __deprecated;
 	unsigned int class;		  /* classes to allow probing for */
 	const struct i2c_algorithm *algo; /* the algorithm to access the bus */
 	void *algo_data;
drivers/i2c/i2c-mux.c +0 -1
@@ -120,7 +120,6 @@ struct i2c_adapter *i2c_add_mux_adapter(
 	snprintf(priv->adap.name, sizeof(priv->adap.name),
 		 "i2c-%d-mux (chan_id %d)", i2c_adapter_id(parent), chan_id);
 	priv->adap.owner = THIS_MODULE;
-	priv->adap.id = parent->id;
 	priv->adap.algo = &priv->algo;
 	priv->adap.algo_data = priv;
 	priv->adap.dev.parent = &parent->dev;
Acked-by
#4 lore raw
In reply to a message not in the archive
Quoted 7 lines · On Friday, November 05, 2010 21:10:01 Jean Delvare wrote:

It's about time to make it clear that i2c_adapter.id is deprecated. Hopefully this will remind the last user to move over to a different strategy.

Cc Hans Verkuil <hverkuil-qWit8jRvyhVmR6Xm/[email protected]>
Cc Jarod Wilson <[email protected]>
Quoted 29 lines
---
 drivers/i2c/i2c-mux.c |    1 -
 include/linux/i2c.h   |    2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)
include/linux/i2c.h +1 -1
@@ -353,7 +353,7 @@ struct i2c_algorithm {
  */
 struct i2c_adapter {
 	struct module *owner;
-	unsigned int id;
+	unsigned int id __deprecated;
 	unsigned int class;		  /* classes to allow probing for */
 	const struct i2c_algorithm *algo; /* the algorithm to access the bus */
 	void *algo_data;
drivers/i2c/i2c-mux.c +0 -1
@@ -120,7 +120,6 @@ struct i2c_adapter *i2c_add_mux_adapter(
 	snprintf(priv->adap.name, sizeof(priv->adap.name),
 		 "i2c-%d-mux (chan_id %d)", i2c_adapter_id(parent), chan_id);
 	priv->adap.owner = THIS_MODULE;
-	priv->adap.id = parent->id;
 	priv->adap.algo = &priv->algo;
 	priv->adap.algo_data = priv;
 	priv->adap.dev.parent = &parent->dev;
Signature · 1 line
Hans Verkuil - video4linux developer - sponsored by Cisco