Skip to content

Commit

Permalink
net: fec_ptp: Use platform_get_irq_xxx_optional() to avoid error message
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
Anson-Huang authored and davem330 committed Oct 30, 2019
1 parent 3b56be2 commit b86bcb2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/ethernet/freescale/fec_ptp.c
Original file line number Diff line number Diff line change
Expand Up @@ -600,9 +600,9 @@ void fec_ptp_init(struct platform_device *pdev, int irq_idx)

INIT_DELAYED_WORK(&fep->time_keep, fec_time_keep);

irq = platform_get_irq_byname(pdev, "pps");
irq = platform_get_irq_byname_optional(pdev, "pps");
if (irq < 0)
irq = platform_get_irq(pdev, irq_idx);
irq = platform_get_irq_optional(pdev, irq_idx);
/* Failure to get an irq is not fatal,
* only the PTP_CLOCK_PPS clock events should stop
*/
Expand Down

0 comments on commit b86bcb2

Please sign in to comment.