summaryrefslogtreecommitdiff
path: root/net/dsa/mv88e6131.c
diff options
context:
space:
mode:
authorBen Hutchings <ben@decadent.org.uk>2011-11-25 14:36:19 +0000
committerDavid S. Miller <davem@davemloft.net>2011-11-26 14:48:15 -0500
commit98e673080bd90b9338428be92dd3597798aac3ed (patch)
treeaea557e2596565fae249712ba652cf6e36e7def5 /net/dsa/mv88e6131.c
parent7df899c36cf09678bdef1824ce591ef4ac0e9864 (diff)
downloadlinux-3.10-98e673080bd90b9338428be92dd3597798aac3ed.tar.gz
linux-3.10-98e673080bd90b9338428be92dd3597798aac3ed.tar.bz2
linux-3.10-98e673080bd90b9338428be92dd3597798aac3ed.zip
mv88e6xxx: Combine mv88e6131 and mv88e612_61_65 drivers
These drivers share a lot of code, so if we make them modular they should be built into the same module. Therefore, link them together and merge their respective module init and exit functions. Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dsa/mv88e6131.c')
-rw-r--r--net/dsa/mv88e6131.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/net/dsa/mv88e6131.c b/net/dsa/mv88e6131.c
index 9bd1061fa4e..45f41239381 100644
--- a/net/dsa/mv88e6131.c
+++ b/net/dsa/mv88e6131.c
@@ -415,7 +415,7 @@ static int mv88e6131_get_sset_count(struct dsa_switch *ds)
return ARRAY_SIZE(mv88e6131_hw_stats);
}
-static struct dsa_switch_driver mv88e6131_switch_driver = {
+struct dsa_switch_driver mv88e6131_switch_driver = {
.tag_protocol = cpu_to_be16(ETH_P_DSA),
.priv_size = sizeof(struct mv88e6xxx_priv_state),
.probe = mv88e6131_probe,
@@ -428,16 +428,3 @@ static struct dsa_switch_driver mv88e6131_switch_driver = {
.get_ethtool_stats = mv88e6131_get_ethtool_stats,
.get_sset_count = mv88e6131_get_sset_count,
};
-
-static int __init mv88e6131_init(void)
-{
- register_switch_driver(&mv88e6131_switch_driver);
- return 0;
-}
-module_init(mv88e6131_init);
-
-static void __exit mv88e6131_cleanup(void)
-{
- unregister_switch_driver(&mv88e6131_switch_driver);
-}
-module_exit(mv88e6131_cleanup);