stmmac: drop driver from stmmac platform code
authorJoachim Eastwood <manabian@gmail.com>
Thu, 14 May 2015 10:11:06 +0000 (12:11 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 15 May 2015 16:44:23 +0000 (12:44 -0400)
The dwmac-generic replaces the driver inside the stmmac
platform code. This turns stmmac platform into a library
used by drivers for common platform driver functions.

Signed-off-by: Joachim Eastwood <manabian@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/dwmac-generic.c
drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c

index fb9623744e4138c60f633a6a787adc2f581e05b2..e817a1a4437927d8976fbfe64c4408f5c0fc5c52 100644 (file)
@@ -1,6 +1,7 @@
 /*
  * Generic DWMAC platform driver
  *
+ * Copyright (C) 2007-2011  STMicroelectronics Ltd
  * Copyright (C) 2015 Joachim Eastwood <manabian@gmail.com>
  *
  * This file is licensed under the terms of the GNU General Public
@@ -12,6 +13,7 @@
 #include <linux/of.h>
 #include <linux/platform_device.h>
 
+#include "stmmac.h"
 #include "stmmac_platform.h"
 
 static const struct of_device_id dwmac_generic_match[] = {
@@ -28,7 +30,7 @@ static struct platform_driver dwmac_generic_driver = {
        .probe  = stmmac_pltfr_probe,
        .remove = stmmac_pltfr_remove,
        .driver = {
-               .name           = "dwmac-generic",
+               .name           = STMMAC_RESOURCE_NAME,
                .pm             = &stmmac_pltfr_pm_ops,
                .of_match_table = of_match_ptr(dwmac_generic_match),
        },
index e3a3c2bff86e55476596e65c83e5b7c6b0da247a..3e194c3ca2977b257458fecde72eba4ac83cd3a3 100644 (file)
 #include "stmmac.h"
 #include "stmmac_platform.h"
 
-static const struct of_device_id stmmac_dt_ids[] = {
-       /* SoC specific glue layers should come before generic bindings */
-       { /* sentinel */ }
-};
-MODULE_DEVICE_TABLE(of, stmmac_dt_ids);
-
 #ifdef CONFIG_OF
 
 /**
@@ -431,19 +425,3 @@ static int stmmac_pltfr_resume(struct device *dev)
 SIMPLE_DEV_PM_OPS(stmmac_pltfr_pm_ops, stmmac_pltfr_suspend,
                                       stmmac_pltfr_resume);
 EXPORT_SYMBOL_GPL(stmmac_pltfr_pm_ops);
-
-static struct platform_driver stmmac_pltfr_driver = {
-       .probe = stmmac_pltfr_probe,
-       .remove = stmmac_pltfr_remove,
-       .driver = {
-                  .name = STMMAC_RESOURCE_NAME,
-                  .pm = &stmmac_pltfr_pm_ops,
-                  .of_match_table = of_match_ptr(stmmac_dt_ids),
-       },
-};
-
-module_platform_driver(stmmac_pltfr_driver);
-
-MODULE_DESCRIPTION("STMMAC 10/100/1000 Ethernet PLATFORM driver");
-MODULE_AUTHOR("Giuseppe Cavallaro <peppe.cavallaro@st.com>");
-MODULE_LICENSE("GPL");