[PATCH linux dev-4.10 v2 3/3] i2c: fsi: Remove idx counter

Eddie James eajames at linux.vnet.ibm.com
Sat Jul 8 07:44:47 AEST 2017


From: "Edward A. James" <eajames at us.ibm.com>

It is no longer used.

Signed-off-by: Joel Stanley <joel at jms.id.au>
Signed-off-by: Edward A. James <eajames at us.ibm.com>
---
 drivers/i2c/busses/i2c-fsi.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/drivers/i2c/busses/i2c-fsi.c b/drivers/i2c/busses/i2c-fsi.c
index 7e03f3a..adcd8cd 100644
--- a/drivers/i2c/busses/i2c-fsi.c
+++ b/drivers/i2c/busses/i2c-fsi.c
@@ -132,7 +132,6 @@
 
 struct fsi_i2c_master {
 	struct fsi_device	*fsi;
-	int			idx;
 	u8			fifo_size;
 	struct list_head	ports;
 	wait_queue_head_t	wait;
@@ -147,8 +146,6 @@ struct fsi_i2c_port {
 	u16			xfrd;
 };
 
-static DEFINE_IDA(fsi_i2c_ida);
-
 static int fsi_i2c_read_reg(struct fsi_device *fsi, unsigned int reg,
 			    u32 *data)
 {
@@ -563,7 +560,6 @@ static int fsi_i2c_probe(struct device *dev)
 	init_waitqueue_head(&i2c->wait);
 	sema_init(&i2c->lock, 1);
 	i2c->fsi = to_fsi_dev(dev);
-	i2c->idx = ida_simple_get(&fsi_i2c_ida, 1, INT_MAX, GFP_KERNEL);
 	INIT_LIST_HEAD(&i2c->ports);
 
 	if (dev->of_node) {
@@ -617,8 +613,6 @@ static int fsi_i2c_remove(struct device *dev)
 		i2c_del_adapter(&port->adapter);
 	}
 
-	ida_simple_remove(&fsi_i2c_ida, i2c->idx);
-
 	return 0;
 }
 
-- 
1.8.3.1



More information about the openbmc mailing list