net/ethernet: xgmac don't set .driver twice
authorBen Dooks <ben.dooks@codethink.co.uk>
Wed, 9 Oct 2019 13:26:27 +0000 (14:26 +0100)
committerJakub Kicinski <jakub.kicinski@netronome.com>
Thu, 10 Oct 2019 04:09:59 +0000 (21:09 -0700)
Cleanup the .driver setup to just do it once, to avoid
the following sparse warning:

drivers/net/ethernet/calxeda/xgmac.c:1914:10: warning: Initializer entry defined twice
drivers/net/ethernet/calxeda/xgmac.c:1920:10:   also defined here

Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
drivers/net/ethernet/calxeda/xgmac.c

index f96a42af101437a8a46b8847915267145180a2b1..af04a2c81adb08131ff0a7799f36113c34f8a685 100644 (file)
@@ -1914,10 +1914,10 @@ static struct platform_driver xgmac_driver = {
        .driver = {
                .name = "calxedaxgmac",
                .of_match_table = xgmac_of_match,
+               .pm = &xgmac_pm_ops,
        },
        .probe = xgmac_probe,
        .remove = xgmac_remove,
-       .driver.pm = &xgmac_pm_ops,
 };
 
 module_platform_driver(xgmac_driver);