Message ID | 20230525152203.32190-3-Jonathan.Cameron@huawei.com |
---|---|
State | Superseded |
Headers | show |
Series | [RFC,1/6] i2c: acpi: set slave mode flag | expand |
On Thu, May 25, 2023 at 6:23 PM Jonathan Cameron <Jonathan.Cameron@huawei.com> wrote: > > A cleanup in it's own right. its ? > This has the handy side effect of working for ACPI FW as well > (unlike fwnode_irq_get() which works for ARM64 but not x86 ACPI) ... > - irq = irq_of_parse_and_map(pdev->dev.of_node, 0); > + irq = platform_get_irq(pdev, 0); It makes sense now not to even try a wrong IRQ, i.e. if (irq < 0) return irq; + blank line here. > ret = devm_request_irq(&pdev->dev, irq, aspeed_i2c_bus_irq, > 0, dev_name(&pdev->dev), bus); > if (ret < 0)
diff --git a/drivers/i2c/busses/i2c-aspeed.c b/drivers/i2c/busses/i2c-aspeed.c index d3c99c5b3247..04155c9a50a5 100644 --- a/drivers/i2c/busses/i2c-aspeed.c +++ b/drivers/i2c/busses/i2c-aspeed.c @@ -19,7 +19,6 @@ #include <linux/kernel.h> #include <linux/module.h> #include <linux/of_address.h> -#include <linux/of_irq.h> #include <linux/of_platform.h> #include <linux/platform_device.h> #include <linux/reset.h> @@ -1043,7 +1042,7 @@ static int aspeed_i2c_probe_bus(struct platform_device *pdev) if (ret < 0) return ret; - irq = irq_of_parse_and_map(pdev->dev.of_node, 0); + irq = platform_get_irq(pdev, 0); ret = devm_request_irq(&pdev->dev, irq, aspeed_i2c_bus_irq, 0, dev_name(&pdev->dev), bus); if (ret < 0)
A cleanup in it's own right. This has the handy side effect of working for ACPI FW as well (unlike fwnode_irq_get() which works for ARM64 but not x86 ACPI) Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> --- drivers/i2c/busses/i2c-aspeed.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)