Skip to content

Commit

Permalink
net: dsa: realtek: remove unnecessary set_drvdata()
Browse files Browse the repository at this point in the history
Remove unnecessary set_drvdata(NULL) function in ->remove(),
the driver_data will be set to NULL in device_unbind_cleanup()
after calling ->remove().

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Acked-by: Alvin Šipraga <alsi@bang-olufsen.dk>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  • Loading branch information
Yang Yingliang authored and Jakub Kicinski committed Sep 23, 2022
1 parent 68c4e29 commit 24d64ce
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 4 deletions.
2 changes: 0 additions & 2 deletions drivers/net/dsa/realtek/realtek-mdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -245,8 +245,6 @@ static void realtek_mdio_remove(struct mdio_device *mdiodev)
/* leave the device reset asserted */
if (priv->reset)
gpiod_set_value(priv->reset, 1);

dev_set_drvdata(&mdiodev->dev, NULL);
}

static void realtek_mdio_shutdown(struct mdio_device *mdiodev)
Expand Down
2 changes: 0 additions & 2 deletions drivers/net/dsa/realtek/realtek-smi.c
Original file line number Diff line number Diff line change
Expand Up @@ -522,8 +522,6 @@ static int realtek_smi_remove(struct platform_device *pdev)
if (priv->reset)
gpiod_set_value(priv->reset, 1);

platform_set_drvdata(pdev, NULL);

return 0;
}

Expand Down

0 comments on commit 24d64ce

Please sign in to comment.