Commit 08e5338d authored by David Miller's avatar David Miller Committed by Jean Delvare

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

Pass adapter data into ->waitforpin() method.
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
parent c429a247
...@@ -135,7 +135,7 @@ static int wait_for_pin(struct i2c_algo_pcf_data *adap, int *status) { ...@@ -135,7 +135,7 @@ static int wait_for_pin(struct i2c_algo_pcf_data *adap, int *status) {
*status = get_pcf(adap, 1); *status = get_pcf(adap, 1);
#ifndef STUB_I2C #ifndef STUB_I2C
while (timeout-- && (*status & I2C_PCF_PIN)) { while (timeout-- && (*status & I2C_PCF_PIN)) {
adap->waitforpin(); adap->waitforpin(adap->data);
*status = get_pcf(adap, 1); *status = get_pcf(adap, 1);
} }
if (*status & I2C_PCF_LAB) { if (*status & I2C_PCF_LAB) {
......
...@@ -104,7 +104,8 @@ static int pcf_isa_getclock(void *data) ...@@ -104,7 +104,8 @@ static int pcf_isa_getclock(void *data)
return (clock); return (clock);
} }
static void pcf_isa_waitforpin(void) { static void pcf_isa_waitforpin(void *data)
{
DEFINE_WAIT(wait); DEFINE_WAIT(wait);
int timeout = 2; int timeout = 2;
unsigned long flags; unsigned long flags;
......
...@@ -31,7 +31,7 @@ struct i2c_algo_pcf_data { ...@@ -31,7 +31,7 @@ struct i2c_algo_pcf_data {
int (*getpcf) (void *data, int ctl); int (*getpcf) (void *data, int ctl);
int (*getown) (void *data); int (*getown) (void *data);
int (*getclock) (void *data); int (*getclock) (void *data);
void (*waitforpin) (void); void (*waitforpin) (void *data);
/* Multi-master lost arbitration back-off delay (msecs) /* Multi-master lost arbitration back-off delay (msecs)
* This should be set by the bus adapter or knowledgable client * This should be set by the bus adapter or knowledgable client
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment