Signed-off-by: Wolfram Sang <wsa+renesas@xxxxxxxxxxxxxxxxxxxx> --- drivers/i2c/busses/i2c-rcar.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers/i2c/busses/i2c-rcar.c b/drivers/i2c/busses/i2c-rcar.c index 1104aafe4433..1a232bc88bed 100644 --- a/drivers/i2c/busses/i2c-rcar.c +++ b/drivers/i2c/busses/i2c-rcar.c @@ -1192,10 +1192,13 @@ static int rcar_i2c_probe(struct platform_device *pdev) goto out_pm_put; } - ret = platform_get_irq(pdev, 0); - if (ret < 0) - goto out_pm_put; - priv->irq = ret; + priv->irq = platform_get_irq_byname_optional(pdev, "main"); + if (priv->irq < 0) { + priv->irq = platform_get_irq(pdev, 0); + if (priv->irq < 0) + goto out_pm_put; + } + ret = devm_request_irq(dev, priv->irq, irqhandler, irqflags, dev_name(dev), priv); if (ret < 0) { dev_err(dev, "cannot get irq %d\n", priv->irq); -- 2.43.0