[PATCHv6 net-next 4/7] net: ibm: emac: use platform_get_irq

Rosen Penev posted 7 patches 1 month, 2 weeks ago
There is a newer version of this series
[PATCHv6 net-next 4/7] net: ibm: emac: use platform_get_irq
Posted by Rosen Penev 1 month, 2 weeks ago
No need for irq_of_parse_and_map since we have platform_device.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
 drivers/net/ethernet/ibm/emac/core.c | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/drivers/net/ethernet/ibm/emac/core.c b/drivers/net/ethernet/ibm/emac/core.c
index 438b08e8e956..f8478f0026af 100644
--- a/drivers/net/ethernet/ibm/emac/core.c
+++ b/drivers/net/ethernet/ibm/emac/core.c
@@ -3031,15 +3031,8 @@ static int emac_probe(struct platform_device *ofdev)
 	if (err)
 		goto err_gone;
 
-	/* Get interrupts. EMAC irq is mandatory */
-	dev->emac_irq = irq_of_parse_and_map(np, 0);
-	if (!dev->emac_irq) {
-		printk(KERN_ERR "%pOF: Can't map main interrupt\n", np);
-		err = -ENODEV;
-		goto err_gone;
-	}
-
 	/* Setup error IRQ handler */
+	dev->emac_irq = platform_get_irq(ofdev, 0);
 	err = devm_request_irq(&ofdev->dev, dev->emac_irq, emac_irq, 0, "EMAC",
 			       dev);
 	if (err) {
-- 
2.47.0
Re: [PATCHv6 net-next 4/7] net: ibm: emac: use platform_get_irq
Posted by Simon Horman 1 month, 2 weeks ago
On Fri, Oct 11, 2024 at 12:56:19PM -0700, Rosen Penev wrote:
> No need for irq_of_parse_and_map since we have platform_device.
> 
> Signed-off-by: Rosen Penev <rosenp@gmail.com>

Reviewed-by: Simon Horman <horms@kernel.org>