i2c: pca-platform: Use platform_irq_get_optional
[ Upstream commit 14c1fe699c
]
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
54d09aab81
commit
a5ef462303
|
@ -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