i2c/pca: Don't use *_interruptible
Unexpected signals can disturb the bus-handling and lock it up. Don't use interruptible in 'wait_event_*' and 'wake_*' as in commitsdc1972d027
(for cpm),1ab082d7cb
(for mpc),b7af349b17
(for omap). Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Jean Delvare <khali@linux-fr.org>
This commit is contained in:
parent
7d53e79f9e
commit
22f8b2695e
|
@ -75,7 +75,7 @@ static int pca_isa_waitforcompletion(void *pd)
|
||||||
unsigned long timeout;
|
unsigned long timeout;
|
||||||
|
|
||||||
if (irq > -1) {
|
if (irq > -1) {
|
||||||
ret = wait_event_interruptible_timeout(pca_wait,
|
ret = wait_event_timeout(pca_wait,
|
||||||
pca_isa_readbyte(pd, I2C_PCA_CON)
|
pca_isa_readbyte(pd, I2C_PCA_CON)
|
||||||
& I2C_PCA_CON_SI, pca_isa_ops.timeout);
|
& I2C_PCA_CON_SI, pca_isa_ops.timeout);
|
||||||
} else {
|
} else {
|
||||||
|
@ -96,7 +96,7 @@ static void pca_isa_resetchip(void *pd)
|
||||||
}
|
}
|
||||||
|
|
||||||
static irqreturn_t pca_handler(int this_irq, void *dev_id) {
|
static irqreturn_t pca_handler(int this_irq, void *dev_id) {
|
||||||
wake_up_interruptible(&pca_wait);
|
wake_up(&pca_wait);
|
||||||
return IRQ_HANDLED;
|
return IRQ_HANDLED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -84,7 +84,7 @@ static int i2c_pca_pf_waitforcompletion(void *pd)
|
||||||
unsigned long timeout;
|
unsigned long timeout;
|
||||||
|
|
||||||
if (i2c->irq) {
|
if (i2c->irq) {
|
||||||
ret = wait_event_interruptible_timeout(i2c->wait,
|
ret = wait_event_timeout(i2c->wait,
|
||||||
i2c->algo_data.read_byte(i2c, I2C_PCA_CON)
|
i2c->algo_data.read_byte(i2c, I2C_PCA_CON)
|
||||||
& I2C_PCA_CON_SI, i2c->adap.timeout);
|
& I2C_PCA_CON_SI, i2c->adap.timeout);
|
||||||
} else {
|
} else {
|
||||||
|
@ -122,7 +122,7 @@ static irqreturn_t i2c_pca_pf_handler(int this_irq, void *dev_id)
|
||||||
if ((i2c->algo_data.read_byte(i2c, I2C_PCA_CON) & I2C_PCA_CON_SI) == 0)
|
if ((i2c->algo_data.read_byte(i2c, I2C_PCA_CON) & I2C_PCA_CON_SI) == 0)
|
||||||
return IRQ_NONE;
|
return IRQ_NONE;
|
||||||
|
|
||||||
wake_up_interruptible(&i2c->wait);
|
wake_up(&i2c->wait);
|
||||||
|
|
||||||
return IRQ_HANDLED;
|
return IRQ_HANDLED;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue