Skip to content

Commit

Permalink
ramips: ethernet: use devm for request_irq
Browse files Browse the repository at this point in the history
Allows removing free_irq. Simpler.

Oddly enough the other switch code already does this.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: openwrt#16050
Signed-off-by: Robert Marko <robimarko@gmail.com>
  • Loading branch information
neheb authored and robimarko committed Aug 19, 2024
1 parent 5d2a008 commit 4045222
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ int mtk_gsw_init(struct fe_priv *priv)
mt7620_ephy_init(gsw);

if (gsw->irq) {
ret = request_irq(gsw->irq, gsw_interrupt_mt7620, 0,
ret = devm_request_irq(&pdev->dev, gsw->irq, gsw_interrupt_mt7620, 0,
"gsw", priv);
if (ret) {
dev_err(&pdev->dev, "Failed to request irq");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1414,7 +1414,6 @@ static void fe_uninit(struct net_device *dev)
fe_mdio_cleanup(priv);

fe_reg_w32(0, FE_REG_FE_INT_ENABLE);
free_irq(dev->irq, dev);
}

static int fe_do_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
Expand Down

0 comments on commit 4045222

Please sign in to comment.