From: Florian Fainelli <f.fainelli@gmail.com>
To: netdev@vger.kernel.org
Cc: davem@davemloft.net, andrew@lunn.ch,
vivien.didelot@savoirfairelinux.com,
Florian Fainelli <f.fainelli@gmail.com>
Subject: [PATCH net-next 5/6] net: dsa: Export dev_to_net_device()
Date: Mon, 27 Jun 2016 17:52:42 -0700 [thread overview]
Message-ID: <1467075163-15890-6-git-send-email-f.fainelli@gmail.com> (raw)
In-Reply-To: <1467075163-15890-1-git-send-email-f.fainelli@gmail.com>
We are going to need this in net/dsa/dsa2.c as well, so make it
avaialable.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
include/net/dsa.h | 1 +
net/dsa/dsa.c | 3 ++-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/include/net/dsa.h b/include/net/dsa.h
index 6de162c8283e..48dce1fd100a 100644
--- a/include/net/dsa.h
+++ b/include/net/dsa.h
@@ -369,6 +369,7 @@ struct dsa_switch_driver {
void register_switch_driver(struct dsa_switch_driver *type);
void unregister_switch_driver(struct dsa_switch_driver *type);
struct mii_bus *dsa_host_dev_to_mii_bus(struct device *dev);
+struct net_device *dev_to_net_device(struct device *dev);
static inline void *ds_to_priv(struct dsa_switch *ds)
{
diff --git a/net/dsa/dsa.c b/net/dsa/dsa.c
index d117580a78b6..9b5ff9814b5e 100644
--- a/net/dsa/dsa.c
+++ b/net/dsa/dsa.c
@@ -626,7 +626,7 @@ struct mii_bus *dsa_host_dev_to_mii_bus(struct device *dev)
}
EXPORT_SYMBOL_GPL(dsa_host_dev_to_mii_bus);
-static struct net_device *dev_to_net_device(struct device *dev)
+struct net_device *dev_to_net_device(struct device *dev)
{
struct device *d;
@@ -643,6 +643,7 @@ static struct net_device *dev_to_net_device(struct device *dev)
return NULL;
}
+EXPORT_SYMBOL_GPL(dev_to_net_device);
#ifdef CONFIG_OF
static int dsa_of_setup_routing_table(struct dsa_platform_data *pd,
--
2.7.4
next prev parent reply other threads:[~2016-06-28 0:52 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-28 0:52 [PATCH net-next 0/6] net: dsa: Platform data for dsa2.c Florian Fainelli
2016-06-28 0:52 ` [PATCH net-next 1/6] net: dsa: Pass device pointer to dsa_register_switch Florian Fainelli
2016-06-28 0:52 ` [PATCH net-next 2/6] net: dsa: Make most functions take a dsa_port argument Florian Fainelli
2016-06-28 0:52 ` [PATCH net-next 3/6] net: dsa: Suffix function manipulating device_node with _dn Florian Fainelli
2016-06-28 0:52 ` [PATCH net-next 4/6] net: dsa: Move ports assignment closer to error checking Florian Fainelli
2016-06-28 0:52 ` Florian Fainelli [this message]
2016-06-28 0:52 ` [PATCH net-next 6/6] net: dsa: Add support for platform data Florian Fainelli
2016-06-28 1:05 ` [PATCH net-next 0/6] net: dsa: Platform data for dsa2.c Andrew Lunn
2016-06-28 1:19 ` Florian Fainelli
2016-06-28 14:17 ` Andrew Lunn
2016-06-29 10:12 ` David Miller
2016-07-04 21:40 ` Florian Fainelli
2016-07-04 22:06 ` 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=1467075163-15890-6-git-send-email-f.fainelli@gmail.com \
--to=f.fainelli@gmail.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=vivien.didelot@savoirfairelinux.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).