mirror of
https://github.com/torvalds/linux.git
synced 2024-11-24 05:02:12 +00:00
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 <chris.packham@alliedtelesis.co.nz> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
This commit is contained in:
parent
f491c66873
commit
14c1fe699c
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user