mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
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: Andy Shevchenko <[email protected]> Signed-off-by: Charles Keepax <[email protected]> Reviewed-by: Mika Westerberg <[email protected]> Signed-off-by: Wolfram Sang <[email protected]>
This commit is contained in:
parent
16c9db1dd8
commit
8466b616cb
2 changed files with 3 additions and 3 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue