netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Joachim Eastwood <manabian@gmail.com>
To: peppe.cavallaro@st.com, davem@davemloft.net
Cc: Joachim Eastwood <manabian@gmail.com>, netdev@vger.kernel.org
Subject: [PATCH net-next 5/8] stmmac: export probe_config_dt() and get_platform_resources()
Date: Fri, 17 Jul 2015 00:26:09 +0200	[thread overview]
Message-ID: <1437085572-11371-6-git-send-email-manabian@gmail.com> (raw)
In-Reply-To: <1437085572-11371-1-git-send-email-manabian@gmail.com>

Export stmmac_probe_config_dt() and stmmac_get_platform_resources()
so they can be used in the dwmac-* drivers themselves. This will
allow us to build more flexible and standalone drivers which just
use stmmac_platform as a library for setup functions.

Signed-off-by: Joachim Eastwood <manabian@gmail.com>
---
 drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 10 ++++++----
 drivers/net/ethernet/stmicro/stmmac/stmmac_platform.h |  8 ++++++++
 2 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
index ea467be93673..eca0eb845241 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
@@ -104,7 +104,7 @@ static int dwmac1000_validate_ucast_entries(int ucast_entries)
  * this function is to read the driver parameters from device-tree and
  * set some private fields that will be used by the main at runtime.
  */
-static struct plat_stmmacenet_data *
+struct plat_stmmacenet_data *
 stmmac_probe_config_dt(struct platform_device *pdev, const char **mac)
 {
 	struct device_node *np = pdev->dev.of_node;
@@ -251,15 +251,16 @@ stmmac_probe_config_dt(struct platform_device *pdev, const char **mac)
 	return plat;
 }
 #else
-static struct plat_stmmacenet_data *
+struct plat_stmmacenet_data *
 stmmac_probe_config_dt(struct platform_device *pdev, const char **mac)
 {
 	return ERR_PTR(-ENOSYS);
 }
 #endif /* CONFIG_OF */
+EXPORT_SYMBOL_GPL(stmmac_probe_config_dt);
 
-static int stmmac_get_platform_resources(struct platform_device *pdev,
-					 struct stmmac_resources *stmmac_res)
+int stmmac_get_platform_resources(struct platform_device *pdev,
+				  struct stmmac_resources *stmmac_res)
 {
 	struct resource *res;
 
@@ -302,6 +303,7 @@ static int stmmac_get_platform_resources(struct platform_device *pdev,
 
 	return 0;
 }
+EXPORT_SYMBOL_GPL(stmmac_get_platform_resources);
 
 /**
  * stmmac_pltfr_probe - platform driver probe.
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.h b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.h
index 71da86d7bd00..84ceb5342686 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.h
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.h
@@ -19,6 +19,14 @@
 #ifndef __STMMAC_PLATFORM_H__
 #define __STMMAC_PLATFORM_H__
 
+#include "stmmac.h"
+
+struct plat_stmmacenet_data *
+stmmac_probe_config_dt(struct platform_device *pdev, const char **mac);
+
+int stmmac_get_platform_resources(struct platform_device *pdev,
+				  struct stmmac_resources *stmmac_res);
+
 int stmmac_pltfr_probe(struct platform_device *pdev);
 int stmmac_pltfr_remove(struct platform_device *pdev);
 extern const struct dev_pm_ops stmmac_pltfr_pm_ops;
-- 
1.8.0

  parent reply	other threads:[~2015-07-16 22:26 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-16 22:26 [PATCH net-next 0/8] stmmac clean up for 4.3 part1 Joachim Eastwood
2015-07-16 22:26 ` [PATCH net-next 1/8] stmmac: use of_device_get_match_data to retrieve of match data Joachim Eastwood
2015-07-16 22:26 ` [PATCH net-next 2/8] stmmac: clean up platform/of_match data retrieval Joachim Eastwood
2015-07-16 22:26 ` [PATCH net-next 3/8] stmmac: introduce stmmac_get_platform_resources() Joachim Eastwood
2015-07-16 22:26 ` [PATCH net-next 4/8] stmmac: make stmmac_probe_config_dt return the platform data struct Joachim Eastwood
2015-07-16 22:26 ` Joachim Eastwood [this message]
2015-07-16 22:26 ` [PATCH net-next 6/8] stmmac: add proper probe function to dwmac-lpc18xx Joachim Eastwood
2015-07-16 22:26 ` [PATCH net-next 7/8] stmmac: add proper probe function to dwmac-meson Joachim Eastwood
2015-07-16 22:26 ` [PATCH net-next 8/8] stmmac: drop custom_* fields from plat_stmmacenet_data Joachim Eastwood
2015-07-21  3:46 ` [PATCH net-next 0/8] stmmac clean up for 4.3 part1 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=1437085572-11371-6-git-send-email-manabian@gmail.com \
    --to=manabian@gmail.com \
    --cc=davem@davemloft.net \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).