]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
net: dsa: realtek: remove unnecessary set_drvdata()
authorYang Yingliang <yangyingliang@huawei.com>
Wed, 21 Sep 2022 14:05:20 +0000 (22:05 +0800)
committerJakub Kicinski <kuba@kernel.org>
Fri, 23 Sep 2022 02:30:39 +0000 (19:30 -0700)
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>
drivers/net/dsa/realtek/realtek-mdio.c
drivers/net/dsa/realtek/realtek-smi.c

index c58f49d558d2415ab69c0a77b43c10a15b57eca9..3e54fac5f9027ca1ae3d11f39f3735a102b0d17d 100644 (file)
@@ -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)
index 45992f79ec8d48da869218970ee96c4bf9546be7..1b447d96b9c46c5d62358ab1bf401533cabe017c 100644 (file)
@@ -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;
 }