linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] i2c: pca-platform: Use platform_irq_get_optional
@ 2020-03-26 22:44 Chris Packham
  2020-03-28  4:03 ` Wolfram Sang
  0 siblings, 1 reply; 2+ messages in thread
From: Chris Packham @ 2020-03-26 22:44 UTC (permalink / raw)
  To: wsa, allison, info, linus.walleij, tglx
  Cc: linux-i2c, linux-kernel, Chris Packham

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>
---
 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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] i2c: pca-platform: Use platform_irq_get_optional
  2020-03-26 22:44 [PATCH] i2c: pca-platform: Use platform_irq_get_optional Chris Packham
@ 2020-03-28  4:03 ` Wolfram Sang
  0 siblings, 0 replies; 2+ messages in thread
From: Wolfram Sang @ 2020-03-28  4:03 UTC (permalink / raw)
  To: Chris Packham; +Cc: allison, info, linus.walleij, tglx, linux-i2c, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 335 bytes --]

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 <chris.packham@alliedtelesis.co.nz>

Applied to for-current, thanks!


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-03-28  4:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-26 22:44 [PATCH] i2c: pca-platform: Use platform_irq_get_optional Chris Packham
2020-03-28  4:03 ` Wolfram Sang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).