Skip to content

Commit

Permalink
i2c: pca-platform: Use platform_irq_get_optional
Browse files Browse the repository at this point in the history
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]>
Signed-off-by: Wolfram Sang <[email protected]>
  • Loading branch information
cpackham-atlnz authored and Wolfram Sang committed Mar 28, 2020
1 parent f491c66 commit 14c1fe6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/i2c/busses/i2c-pca-platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 14c1fe6

Please sign in to comment.