mirror of https://gitee.com/openkylin/linux.git
i2c: designware: Disable interrupts before requesting PCI device interrupt
Device must not generate interrupts before registering the interrupt
handler so move i2c_dw_disable_int() before requesting it.
There are no known issues with this. The code has been here since commit
fe20ff5c7e
("i2c-designware: Add support for Designware core behind PCI
devices.").
Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
This commit is contained in:
parent
c335631a68
commit
b9f84adcb8
|
@ -260,6 +260,7 @@ static int i2c_dw_pci_probe(struct pci_dev *pdev,
|
||||||
|
|
||||||
snprintf(adap->name, sizeof(adap->name), "i2c-designware-pci");
|
snprintf(adap->name, sizeof(adap->name), "i2c-designware-pci");
|
||||||
|
|
||||||
|
i2c_dw_disable_int(dev);
|
||||||
r = devm_request_irq(&pdev->dev, pdev->irq, i2c_dw_isr,
|
r = devm_request_irq(&pdev->dev, pdev->irq, i2c_dw_isr,
|
||||||
IRQF_SHARED | IRQF_COND_SUSPEND, adap->name, dev);
|
IRQF_SHARED | IRQF_COND_SUSPEND, adap->name, dev);
|
||||||
if (r) {
|
if (r) {
|
||||||
|
@ -267,7 +268,6 @@ static int i2c_dw_pci_probe(struct pci_dev *pdev,
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
i2c_dw_disable_int(dev);
|
|
||||||
r = i2c_add_numbered_adapter(adap);
|
r = i2c_add_numbered_adapter(adap);
|
||||||
if (r) {
|
if (r) {
|
||||||
dev_err(&pdev->dev, "failure adding adapter\n");
|
dev_err(&pdev->dev, "failure adding adapter\n");
|
||||||
|
|
Loading…
Reference in New Issue