2020-03-26 22:45:33

by Chris Packham

[permalink] [raw]
Subject: [PATCH] i2c: pca-platform: Use platform_irq_get_optional

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 <[email protected]>
---
drivers/i2c/busses/i2c-pca-platform.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/i2c/busses/i2c-pca-platform.c b/drivers/i2c/busses/i2c-pca-platform.c
index a7a81846d5b1..635dd697ac0b 100644
--- a/drivers/i2c/busses/i2c-pca-platform.c
+++ b/drivers/i2c/busses/i2c-pca-platform.c
@@ -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;
--
2.25.1


2020-03-28 04:05:16

by Wolfram Sang

[permalink] [raw]
Subject: Re: [PATCH] i2c: pca-platform: Use platform_irq_get_optional

On Fri, Mar 27, 2020 at 11:44:22AM +1300, Chris Packham wrote:
> 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 <[email protected]>

Applied to for-current, thanks!


Attachments:
(No filename) (335.00 B)
signature.asc (849.00 B)
Download all attachments