Skip to contentSkip to conversation

: i2c-pcf: Pass adapter data into ->waitforpin() method.

PATCH Applied David Miller 2 participants 2 messages Aug 21, 2008 – Oct 15, 2008 1 message not in the archive I2C subsystem host drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/6 : i2c-pcf: Pass adapter data into ->waitforpin() method.

i2c-pcf: Pass adapter data into ->waitforpin() method.

drivers/i2c/algos/i2c-algo-pcf.c +1 -1
index 1e328d1..a8a5b6d 100644
@@ -135,7 +135,7 @@ static int wait_for_pin(struct i2c_algo_pcf_data *adap, int *status) {
 	*status = get_pcf(adap, 1);
 #ifndef STUB_I2C
 	while (timeout-- && (*status & I2C_PCF_PIN)) {
-		adap->waitforpin();
+		adap->waitforpin(adap->data);
 		*status = get_pcf(adap, 1);
 	}
 	if (*status & I2C_PCF_LAB) {
drivers/i2c/busses/i2c-elektor.c +1 -1
index 7f38c01..05f7d09 100644
@@ -104,7 +104,7 @@ static int pcf_isa_getclock(void *data)
 	return (clock);
 }
 
-static void pcf_isa_waitforpin(void) {
+static void pcf_isa_waitforpin(void *data) {
 	DEFINE_WAIT(wait);
 	int timeout = 2;
 	unsigned long flags;
include/linux/i2c-algo-pcf.h +1 -1
index 0177d28..5de8a31 100644
@@ -31,7 +31,7 @@ struct i2c_algo_pcf_data {
 	int  (*getpcf) (void *data, int ctl);
 	int  (*getown) (void *data);
 	int  (*getclock) (void *data);
-	void (*waitforpin) (void);
+	void (*waitforpin) (void *data);
 
 	/* Multi-master lost arbitration back-off delay (msecs)
 	 * This should be set by the bus adapter or knowledgable client
Signature · 7 lines
1.5.6.5.GIT


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

A message that is not in the archive (sent off-list or not yet received): 20080821.024319.22788780.davem-fT/PcQaiUtIeIZ0/[email protected]

#2 lore raw

Hi David,

Quoted 36 lines · David Miller

i2c-pcf: Pass adapter data into ->waitforpin() method.

drivers/i2c/algos/i2c-algo-pcf.c +1 -1
index 1e328d1..a8a5b6d 100644
@@ -135,7 +135,7 @@ static int wait_for_pin(struct i2c_algo_pcf_data *adap, int *status) {
 	*status = get_pcf(adap, 1);
 #ifndef STUB_I2C
 	while (timeout-- && (*status & I2C_PCF_PIN)) {
-		adap->waitforpin();
+		adap->waitforpin(adap->data);
 		*status = get_pcf(adap, 1);
 	}
 	if (*status & I2C_PCF_LAB) {
drivers/i2c/busses/i2c-elektor.c +1 -1
index 7f38c01..05f7d09 100644
@@ -104,7 +104,7 @@ static int pcf_isa_getclock(void *data)
 	return (clock);
 }
 
-static void pcf_isa_waitforpin(void) {
+static void pcf_isa_waitforpin(void *data) {
 	DEFINE_WAIT(wait);
 	int timeout = 2;
 	unsigned long flags;
include/linux/i2c-algo-pcf.h +0 -0
index 0177d28..5de8a31 100644

include/linux/i2c-algo-pcf.h struct i2c_algo_pcf_data { · line 37

Quoted 8 lines
include/linux/i2c-algo-pcf.h +1 -1
@@ -31,7 +31,7 @@ struct i2c_algo_pcf_data {
 	int  (*getpcf) (void *data, int ctl);
 	int  (*getown) (void *data);
 	int  (*getclock) (void *data);
-	void (*waitforpin) (void);
+	void (*waitforpin) (void *data);
 
 	/* Multi-master lost arbitration back-off delay (msecs)
 	 * This should be set by the bus adapter or knowledgable client

Applied (with one checkpatch fix), thanks.

Signature · 6 lines
Jean Delvare

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