751-v5.6-net-mvmdio-avoid-error-message-for-optional-IRQ.patch 1.2 KB

123456789101112131415161718192021222324252627282930313233
  1. From fa2632f74e57bbc869c8ad37751a11b6147a3acc Mon Sep 17 00:00:00 2001
  2. From: Chris Packham <[email protected]>
  3. Date: Mon, 16 Mar 2020 20:49:07 +1300
  4. Subject: [PATCH] net: mvmdio: avoid error message for optional IRQ
  5. Per the dt-binding the interrupt is optional so use
  6. platform_get_irq_optional() instead of platform_get_irq(). Since
  7. commit 7723f4c5ecdb ("driver core: platform: Add an error message to
  8. platform_get_irq*()") platform_get_irq() produces an error message
  9. orion-mdio f1072004.mdio: IRQ index 0 not found
  10. which is perfectly normal if one hasn't specified the optional property
  11. in the device tree.
  12. Signed-off-by: Chris Packham <[email protected]>
  13. Reviewed-by: Andrew Lunn <[email protected]>
  14. Signed-off-by: David S. Miller <[email protected]>
  15. ---
  16. drivers/net/ethernet/marvell/mvmdio.c | 2 +-
  17. 1 file changed, 1 insertion(+), 1 deletion(-)
  18. --- a/drivers/net/ethernet/marvell/mvmdio.c
  19. +++ b/drivers/net/ethernet/marvell/mvmdio.c
  20. @@ -347,7 +347,7 @@ static int orion_mdio_probe(struct platf
  21. }
  22. - dev->err_interrupt = platform_get_irq(pdev, 0);
  23. + dev->err_interrupt = platform_get_irq_optional(pdev, 0);
  24. if (dev->err_interrupt > 0 &&
  25. resource_size(r) < MVMDIO_ERR_INT_MASK + 4) {
  26. dev_err(&pdev->dev,