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]>
---
- The patch f1da567f1dc1 ("driver core: platform: Add platform_get_irq_byname_optional()")
already landed on network/master, resend this patch set.
---
drivers/net/ethernet/freescale/fec_ptp.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/freescale/fec_ptp.c b/drivers/net/ethernet/freescale/fec_ptp.c
index 19e2365..945643c 100644
--- a/drivers/net/ethernet/freescale/fec_ptp.c
+++ b/drivers/net/ethernet/freescale/fec_ptp.c
@@ -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
*/
--
2.7.4
From: Anson Huang <[email protected]>
Date: Tue, 29 Oct 2019 09:53:19 +0800
> 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]>
Applied.