All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joachim Eastwood <manabian@gmail.com>
To: arnd@arndb.de, peppe.cavallaro@st.com
Cc: Joachim Eastwood <manabian@gmail.com>,
	netdev@vger.kernel.org, davem@davemloft.net,
	linux-arm-kernel@lists.infradead.org
Subject: [PATCH net-next 11/11] stmmac: drop driver from stmmac platform code
Date: Thu, 14 May 2015 12:11:06 +0200	[thread overview]
Message-ID: <1431598266-25736-12-git-send-email-manabian@gmail.com> (raw)
In-Reply-To: <1431598266-25736-1-git-send-email-manabian@gmail.com>

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>
---
 .../net/ethernet/stmicro/stmmac/dwmac-generic.c    |  4 +++-
 .../net/ethernet/stmicro/stmmac/stmmac_platform.c  | 22 ----------------------
 2 files changed, 3 insertions(+), 23 deletions(-)

diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-generic.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-generic.c
index fb9623744e41..e817a1a44379 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-generic.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-generic.c
@@ -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),
 	},
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
index e3a3c2bff86e..3e194c3ca297 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
@@ -32,12 +32,6 @@
 #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");
-- 
1.8.0

WARNING: multiple messages have this Message-ID (diff)
From: manabian@gmail.com (Joachim Eastwood)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH net-next 11/11] stmmac: drop driver from stmmac platform code
Date: Thu, 14 May 2015 12:11:06 +0200	[thread overview]
Message-ID: <1431598266-25736-12-git-send-email-manabian@gmail.com> (raw)
In-Reply-To: <1431598266-25736-1-git-send-email-manabian@gmail.com>

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>
---
 .../net/ethernet/stmicro/stmmac/dwmac-generic.c    |  4 +++-
 .../net/ethernet/stmicro/stmmac/stmmac_platform.c  | 22 ----------------------
 2 files changed, 3 insertions(+), 23 deletions(-)

diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-generic.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-generic.c
index fb9623744e41..e817a1a44379 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-generic.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-generic.c
@@ -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),
 	},
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
index e3a3c2bff86e..3e194c3ca297 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
@@ -32,12 +32,6 @@
 #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");
-- 
1.8.0

  parent reply	other threads:[~2015-05-14 10:11 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-14 10:10 [PATCH net-next 00/11] convert stmmac glue layers into platform drivers Joachim Eastwood
2015-05-14 10:10 ` Joachim Eastwood
2015-05-14 10:10 ` [PATCH net-next 01/11] stmmac: add dwmac glue for NXP 18xx/43xx family Joachim Eastwood
2015-05-14 10:10   ` Joachim Eastwood
2015-05-14 10:10 ` [PATCH net-next 02/11] doc: dt: add documentation for nxp,lpc1850-dwmac Joachim Eastwood
2015-05-14 10:10   ` [PATCH net-next 02/11] doc: dt: add documentation for nxp, lpc1850-dwmac Joachim Eastwood
2015-05-14 10:10 ` [PATCH net-next 03/11] stmmac: prepare stmmac platform to support stand alone drivers Joachim Eastwood
2015-05-14 10:10   ` Joachim Eastwood
2015-05-14 10:10 ` [PATCH net-next 04/11] stmmac: add a generic dwmac driver Joachim Eastwood
2015-05-14 10:10   ` Joachim Eastwood
2015-05-14 10:11 ` [PATCH net-next 05/11] stmmac: convert dwmac-lpc18xx to a platform driver Joachim Eastwood
2015-05-14 10:11   ` Joachim Eastwood
2015-05-14 10:11 ` [PATCH net-next 06/11] stmmac: convert dwmac-meson to " Joachim Eastwood
2015-05-14 10:11   ` Joachim Eastwood
2015-05-14 10:11 ` [PATCH net-next 07/11] stmmac: convert dwmac-rk " Joachim Eastwood
2015-05-14 10:11   ` Joachim Eastwood
2015-05-14 10:11 ` [PATCH net-next 08/11] stmmac: convert dwmac-socfpga " Joachim Eastwood
2015-05-14 10:11   ` Joachim Eastwood
2015-05-14 10:11 ` [PATCH net-next 09/11] stmmac: convert dwmac-sti " Joachim Eastwood
2015-05-14 10:11   ` Joachim Eastwood
2015-05-14 10:11 ` [PATCH net-next 10/11] stmmac: convert dwmac-sunxi " Joachim Eastwood
2015-05-14 10:11   ` Joachim Eastwood
2015-05-14 10:11 ` Joachim Eastwood [this message]
2015-05-14 10:11   ` [PATCH net-next 11/11] stmmac: drop driver from stmmac platform code Joachim Eastwood
2015-05-14 15:24 ` [PATCH net-next 00/11] convert stmmac glue layers into platform drivers Chen-Yu Tsai
2015-05-14 15:24   ` Chen-Yu Tsai
     [not found]   ` <CAGb2v663efjkwgRjPdxV4CQxeesiu7jxkMf9j_oPU_bSHbNNiA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-05-15  7:45     ` Giuseppe CAVALLARO
2015-05-15  7:45       ` Giuseppe CAVALLARO
     [not found]       ` <5555A42B.3040205-qxv4g6HH51o@public.gmane.org>
2015-05-15  8:44         ` Arnd Bergmann
2015-05-15  8:44           ` Arnd Bergmann
2015-05-15  9:11           ` Giuseppe CAVALLARO
2015-05-15  9:11             ` Giuseppe CAVALLARO
2015-05-14 19:53 ` Dinh Nguyen
2015-05-14 19:53   ` Dinh Nguyen
2015-05-14 19:53   ` Dinh Nguyen
2015-05-15 16:44 ` David Miller
2015-05-15 16:44   ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1431598266-25736-12-git-send-email-manabian@gmail.com \
    --to=manabian@gmail.com \
    --cc=arnd@arndb.de \
    --cc=davem@davemloft.net \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=netdev@vger.kernel.org \
    --cc=peppe.cavallaro@st.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.