Skip to content

Commit

Permalink
i2c-algo-pcf: Pass adapter data into ->waitforpin() method
Browse files Browse the repository at this point in the history
Pass adapter data into ->waitforpin() method.

Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
  • Loading branch information
David Miller authored and Jean Delvare committed Oct 22, 2008
1 parent c429a24 commit 08e5338
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion drivers/i2c/algos/i2c-algo-pcf.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
3 changes: 2 additions & 1 deletion drivers/i2c/busses/i2c-elektor.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion include/linux/i2c-algo-pcf.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 08e5338

Please sign in to comment.