Commit 8466b616 authored by Charles Keepax's avatar Charles Keepax Committed by Wolfram Sang
Browse files

i2c: core: Move ACPI gpio IRQ handling into i2c_acpi_get_irq



It makes sense to contain all the ACPI IRQ handling in a single helper
function.
Reviewed-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: default avatarCharles Keepax <ckeepax@opensource.cirrus.com>
Reviewed-by: default avatarMika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
parent 16c9db1d
......@@ -172,6 +172,9 @@ int i2c_acpi_get_irq(struct i2c_client *client)
acpi_dev_free_resource_list(&resource_list);
if (irq == -ENOENT)
irq = acpi_dev_gpio_irq_get(adev, 0);
return irq;
}
......
......@@ -336,9 +336,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(client);
if (irq == -ENOENT)
irq = acpi_dev_gpio_irq_get(ACPI_COMPANION(dev), 0);
}
if (irq == -EPROBE_DEFER)
return irq;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment