mirror of
https://github.com/torvalds/linux.git
synced 2024-11-23 20:51:44 +00:00
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:
parent
c429a247f5
commit
08e5338d11
@ -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)
|
|||||||
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 {
|
|||||||
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
|
||||||
|
Loading…
Reference in New Issue
Block a user