]> git.baikalelectronics.ru Git - kernel.git/commitdiff
i2c: pca-platform: Use platform_irq_get_optional
authorChris Packham <chris.packham@alliedtelesis.co.nz>
Thu, 26 Mar 2020 22:44:22 +0000 (11:44 +1300)
committerWolfram Sang <wsa@the-dreams.de>
Sat, 28 Mar 2020 04:03:17 +0000 (05:03 +0100)
The interrupt is not required so use platform_irq_get_optional() to
avoid error messages like

  i2c-pca-platform 22080000.i2c: IRQ index 0 not found

Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
drivers/i2c/busses/i2c-pca-platform.c

index a7a81846d5b1d80062bc7420d943cea5b9abc880..635dd697ac0bbda3bdc8fe73bd4014bbb14a1b36 100644 (file)
@@ -140,7 +140,7 @@ static int i2c_pca_pf_probe(struct platform_device *pdev)
        int ret = 0;
        int irq;
 
-       irq = platform_get_irq(pdev, 0);
+       irq = platform_get_irq_optional(pdev, 0);
        /* If irq is 0, we do polling. */
        if (irq < 0)
                irq = 0;