Skip to contentSkip to conversation

i2c-algo-pcf: Drop unused struct members

PATCH In review Jean Delvare 3 participants 3 messages Jun 13, 2008 2 messages not in the archive I2C subsystem host drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 i2c-algo-pcf: Drop unused struct members

Struct members udelay and timeout aren't used anywhere, so drop them.

---
Eric, Daniel, you're using i2c-algo-pcf more than me, can you please check and confirm that this patch is correct? It applies on top of Eric's patch for lost arbitration handling.

 drivers/i2c/busses/i2c-elektor.c |    2 --
 include/linux/i2c-algo-pcf.h     |    4 ----
 2 files changed, 6 deletions(-)
drivers/i2c/busses/i2c-elektor.c +0 -2
@@ -196,8 +196,6 @@ static struct i2c_algo_pcf_data pcf_isa_
 	.getown	    = pcf_isa_getown,
 	.getclock   = pcf_isa_getclock,
 	.waitforpin = pcf_isa_waitforpin,
-	.udelay	    = 10,
-	.timeout    = 100,
 };
 
 static struct i2c_adapter pcf_isa_ops = {
include/linux/i2c-algo-pcf.h +0 -4
@@ -33,10 +33,6 @@ struct i2c_algo_pcf_data {
 	int  (*getclock) (void *data);
 	void (*waitforpin) (void);
 
-	/* local settings */
-	int udelay;
-	int timeout;
-
 	/* Multi-master lost arbitration back-off delay (msecs)
 	 * This should be set by the bus adapter or knowledgable client
 	 * if bus is multi-mastered, else zero
Signature · 6 lines
Jean Delvare

_______________________________________________
i2c mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/i2c
#2 lore raw
In reply to a message not in the archive
Quoted 39 lines · Jean Delvare

Struct members udelay and timeout aren't used anywhere, so drop them.

---
Eric, Daniel, you're using i2c-algo-pcf more than me, can you please check and confirm that this patch is correct? It applies on top of Eric's patch for lost arbitration handling.

 drivers/i2c/busses/i2c-elektor.c |    2 --
 include/linux/i2c-algo-pcf.h     |    4 ----
 2 files changed, 6 deletions(-)
drivers/i2c/busses/i2c-elektor.c 2008-06-13 09:32:27.000000000 +0200 renamed from drivers/i2c/busses/i2c-elektor.c 2008-06-12 15:22:32.000000000 +0200 +0 -2
@@ -196,8 +196,6 @@ static struct i2c_algo_pcf_data pcf_isa_
       .getown     = pcf_isa_getown,
       .getclock   = pcf_isa_getclock,
       .waitforpin = pcf_isa_waitforpin,
-       .udelay     = 10,
-       .timeout    = 100,
 };
 
 static struct i2c_adapter pcf_isa_ops = {
include/linux/i2c-algo-pcf.h 2008-06-13 09:11:50.000000000 +0200 renamed from include/linux/i2c-algo-pcf.h 2008-06-13 09:08:00.000000000 +0200 +0 -5
@@ -33,10 +33,6 @@ struct i2c_algo_pcf_data {
       int  (*getclock) (void *data);
       void (*waitforpin) (void);
 
-       /* local settings */
-       int udelay;
-       int timeout;
-
       /* Multi-master lost arbitration back-off delay (msecs)
        * This should be set by the bus adapter or knowledgable client
        * if bus is multi-mastered, else zero
 
 
--
Quoted 2 lines

Jean Delvare

ACKed on 2.6.26-rc1. Compiles (and runs) fine.

[Daniel, this requires changes to i2c-envctrl, since it references the removed members when initializing the i2c_algo_pcf_data struct.]

Thanks again, Jean.

E

Signature · 6 lines
E

_______________________________________________
i2c mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/i2c
#4 lore raw
In reply to a message not in the archive

Eric Brower napsal(a):

Quoted 45 lines · Jean Delvare
Quoted 39 lines

Struct members udelay and timeout aren't used anywhere, so drop them.

---
Eric, Daniel, you're using i2c-algo-pcf more than me, can you please check and confirm that this patch is correct? It applies on top of Eric's patch for lost arbitration handling.

 drivers/i2c/busses/i2c-elektor.c |    2 --
 include/linux/i2c-algo-pcf.h     |    4 ----
 2 files changed, 6 deletions(-)
drivers/i2c/busses/i2c-elektor.c 2008-06-13 09:32:27.000000000 +0200 renamed from drivers/i2c/busses/i2c-elektor.c 2008-06-12 15:22:32.000000000 +0200 +0 -2
@@ -196,8 +196,6 @@ static struct i2c_algo_pcf_data pcf_isa_
       .getown     = pcf_isa_getown,
       .getclock   = pcf_isa_getclock,
       .waitforpin = pcf_isa_waitforpin,
-       .udelay     = 10,
-       .timeout    = 100,
 };
 
 static struct i2c_adapter pcf_isa_ops = {
include/linux/i2c-algo-pcf.h 2008-06-13 09:11:50.000000000 +0200 renamed from include/linux/i2c-algo-pcf.h 2008-06-13 09:08:00.000000000 +0200 +0 -5
@@ -33,10 +33,6 @@ struct i2c_algo_pcf_data {
       int  (*getclock) (void *data);
       void (*waitforpin) (void);
 
-       /* local settings */
-       int udelay;
-       int timeout;
-
       /* Multi-master lost arbitration back-off delay (msecs)
        * This should be set by the bus adapter or knowledgable client
        * if bus is multi-mastered, else zero
 
 
--
Quoted 2 lines

Jean Delvare

ACKed on 2.6.26-rc1. Compiles (and runs) fine.

Quoted 8 lines

[Daniel, this requires changes to i2c-envctrl, since it references the removed members when initializing the i2c_algo_pcf_data struct.]

Thanks again, Jean.

E

Do you includes this changes to SVN repository or can do it myself on my source ?

Dan

_______________________________________________
i2c mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/i2c