net: dsa: realtek: Remove redundant of_match_ptr()
authorRuan Jinjie <ruanjinjie@huawei.com>
Mon, 14 Aug 2023 02:55:15 +0000 (10:55 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 16 Aug 2023 08:59:40 +0000 (09:59 +0100)
The driver depends on CONFIG_OF, it is not necessary to use
of_match_ptr() here.

Signed-off-by: Ruan Jinjie <ruanjinjie@huawei.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/realtek/realtek-mdio.c
drivers/net/dsa/realtek/realtek-smi.c

index 4310e77..292e6d0 100644 (file)
@@ -276,7 +276,7 @@ MODULE_DEVICE_TABLE(of, realtek_mdio_of_match);
 static struct mdio_driver realtek_mdio_driver = {
        .mdiodrv.driver = {
                .name = "realtek-mdio",
-               .of_match_table = of_match_ptr(realtek_mdio_of_match),
+               .of_match_table = realtek_mdio_of_match,
        },
        .probe  = realtek_mdio_probe,
        .remove = realtek_mdio_remove,
index c2bd8bb..ff13563 100644 (file)
@@ -556,7 +556,7 @@ MODULE_DEVICE_TABLE(of, realtek_smi_of_match);
 static struct platform_driver realtek_smi_driver = {
        .driver = {
                .name = "realtek-smi",
-               .of_match_table = of_match_ptr(realtek_smi_of_match),
+               .of_match_table = realtek_smi_of_match,
        },
        .probe  = realtek_smi_probe,
        .remove = realtek_smi_remove,