Skip to content

Commit b86bcb2

Browse files
Anson-Huangdavem330
authored andcommitted
net: fec_ptp: Use platform_get_irq_xxx_optional() to avoid error message
Use platform_get_irq_byname_optional() and platform_get_irq_optional() instead of platform_get_irq_byname() and platform_get_irq() for optional IRQs to avoid below error message during probe: [ 0.795803] fec 30be0000.ethernet: IRQ pps not found [ 0.800787] fec 30be0000.ethernet: IRQ index 3 not found Signed-off-by: Anson Huang <[email protected]> Acked-by: Fugang Duan <[email protected]> Reviewed-by: Stephen Boyd <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 3b56be2 commit b86bcb2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/net/ethernet/freescale/fec_ptp.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -600,9 +600,9 @@ void fec_ptp_init(struct platform_device *pdev, int irq_idx)
600600

601601
INIT_DELAYED_WORK(&fep->time_keep, fec_time_keep);
602602

603-
irq = platform_get_irq_byname(pdev, "pps");
603+
irq = platform_get_irq_byname_optional(pdev, "pps");
604604
if (irq < 0)
605-
irq = platform_get_irq(pdev, irq_idx);
605+
irq = platform_get_irq_optional(pdev, irq_idx);
606606
/* Failure to get an irq is not fatal,
607607
* only the PTP_CLOCK_PPS clock events should stop
608608
*/

0 commit comments

Comments
 (0)