Message ID | 20190621100815.12417-7-ckeepax@opensource.cirrus.com (mailing list archive) |
---|---|
State | Not Applicable, archived |
Headers | show |
Series | I2C IRQ Probe Improvements | expand |
diff --git a/drivers/i2c/i2c-core-acpi.c b/drivers/i2c/i2c-core-acpi.c index aaca1e216be66..042c1cb148bc6 100644 --- a/drivers/i2c/i2c-core-acpi.c +++ b/drivers/i2c/i2c-core-acpi.c @@ -169,6 +169,9 @@ int i2c_acpi_get_irq(struct device *dev) acpi_dev_free_resource_list(&resource_list); + if (irq == -ENOENT) + irq = acpi_dev_gpio_irq_get(adev, 0); + return irq; } diff --git a/drivers/i2c/i2c-core-base.c b/drivers/i2c/i2c-core-base.c index 34de732598533..87a2ad8f41a76 100644 --- a/drivers/i2c/i2c-core-base.c +++ b/drivers/i2c/i2c-core-base.c @@ -328,9 +328,6 @@ static int i2c_device_probe(struct device *dev) irq = of_irq_get(dev->of_node, 0); } else if (ACPI_COMPANION(dev)) { irq = i2c_acpi_get_irq(dev); - - if (irq == -ENOENT) - irq = acpi_dev_gpio_irq_get(ACPI_COMPANION(dev), 0); } if (irq == -EPROBE_DEFER) return irq;