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>
This commit is contained in:
David Miller 2008-10-22 20:21:29 +02:00 committed by Jean Delvare
parent c429a247f5
commit 08e5338d11
3 changed files with 4 additions and 3 deletions

View File

@ -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) {

View File

@ -104,7 +104,8 @@ 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;

View File

@ -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