Commit 24d64ced authored by Yang Yingliang's avatar Yang Yingliang Committed by Jakub Kicinski

net: dsa: realtek: remove unnecessary set_drvdata()

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: default avatarYang Yingliang <yangyingliang@huawei.com>
Acked-by: default avatarAlvin Šipraga <alsi@bang-olufsen.dk>
Acked-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 68c4e297
...@@ -245,8 +245,6 @@ static void realtek_mdio_remove(struct mdio_device *mdiodev) ...@@ -245,8 +245,6 @@ static void realtek_mdio_remove(struct mdio_device *mdiodev)
/* leave the device reset asserted */ /* leave the device reset asserted */
if (priv->reset) if (priv->reset)
gpiod_set_value(priv->reset, 1); gpiod_set_value(priv->reset, 1);
dev_set_drvdata(&mdiodev->dev, NULL);
} }
static void realtek_mdio_shutdown(struct mdio_device *mdiodev) static void realtek_mdio_shutdown(struct mdio_device *mdiodev)
......
...@@ -522,8 +522,6 @@ static int realtek_smi_remove(struct platform_device *pdev) ...@@ -522,8 +522,6 @@ static int realtek_smi_remove(struct platform_device *pdev)
if (priv->reset) if (priv->reset)
gpiod_set_value(priv->reset, 1); gpiod_set_value(priv->reset, 1);
platform_set_drvdata(pdev, NULL);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment