aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Miller <davem@davemloft.net>2008-10-22 14:21:29 -0400
committerJean Delvare <khali@linux-fr.org>2008-10-22 14:21:29 -0400
commit08e5338d119daeb3c7746fa80fa916b8d3d48e89 (patch)
tree5a4b1985b4c9d3741d01f574de458bb0fd30084f
parentc429a247f56d277f12eaffd6525922353e9539a5 (diff)
i2c-algo-pcf: Pass adapter data into ->waitforpin() method
Pass adapter data into ->waitforpin() method. Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Jean Delvare <khali@linux-fr.org>
-rw-r--r--drivers/i2c/algos/i2c-algo-pcf.c2
-rw-r--r--drivers/i2c/busses/i2c-elektor.c3
-rw-r--r--include/linux/i2c-algo-pcf.h2
3 files changed, 4 insertions, 3 deletions
diff --git a/drivers/i2c/algos/i2c-algo-pcf.c b/drivers/i2c/algos/i2c-algo-pcf.c
index 1e328d19cd6d..a8a5b6d1dd88 100644
--- a/drivers/i2c/algos/i2c-algo-pcf.c
+++ b/drivers/i2c/algos/i2c-algo-pcf.c
@@ -135,7 +135,7 @@ static int wait_for_pin(struct i2c_algo_pcf_data *adap, int *status) {
135 *status = get_pcf(adap, 1); 135 *status = get_pcf(adap, 1);
136#ifndef STUB_I2C 136#ifndef STUB_I2C
137 while (timeout-- && (*status & I2C_PCF_PIN)) { 137 while (timeout-- && (*status & I2C_PCF_PIN)) {
138 adap->waitforpin(); 138 adap->waitforpin(adap->data);
139 *status = get_pcf(adap, 1); 139 *status = get_pcf(adap, 1);
140 } 140 }
141 if (*status & I2C_PCF_LAB) { 141 if (*status & I2C_PCF_LAB) {
diff --git a/drivers/i2c/busses/i2c-elektor.c b/drivers/i2c/busses/i2c-elektor.c
index 7f38c01fb3a0..0ed3ccb81b63 100644
--- a/drivers/i2c/busses/i2c-elektor.c
+++ b/drivers/i2c/busses/i2c-elektor.c
@@ -104,7 +104,8 @@ static int pcf_isa_getclock(void *data)
104 return (clock); 104 return (clock);
105} 105}
106 106
107static void pcf_isa_waitforpin(void) { 107static void pcf_isa_waitforpin(void *data)
108{
108 DEFINE_WAIT(wait); 109 DEFINE_WAIT(wait);
109 int timeout = 2; 110 int timeout = 2;
110 unsigned long flags; 111 unsigned long flags;
diff --git a/include/linux/i2c-algo-pcf.h b/include/linux/i2c-algo-pcf.h
index 0177d280f733..5de8a319bf14 100644
--- a/include/linux/i2c-algo-pcf.h
+++ b/include/linux/i2c-algo-pcf.h
@@ -31,7 +31,7 @@ struct i2c_algo_pcf_data {
31 int (*getpcf) (void *data, int ctl); 31 int (*getpcf) (void *data, int ctl);
32 int (*getown) (void *data); 32 int (*getown) (void *data);
33 int (*getclock) (void *data); 33 int (*getclock) (void *data);
34 void (*waitforpin) (void); 34 void (*waitforpin) (void *data);
35 35
36 /* Multi-master lost arbitration back-off delay (msecs) 36 /* Multi-master lost arbitration back-off delay (msecs)
37 * This should be set by the bus adapter or knowledgable client 37 * This should be set by the bus adapter or knowledgable client