Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 277952
b: refs/heads/master
c: 98e6730
h: refs/heads/master
v: v3
  • Loading branch information
Ben Hutchings authored and David S. Miller committed Nov 26, 2011
1 parent 912bb3e commit 063a101
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 32 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7df899c36cf09678bdef1824ce591ef4ac0e9864
refs/heads/master: 98e673080bd90b9338428be92dd3597798aac3ed
7 changes: 4 additions & 3 deletions trunk/net/dsa/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ dsa_core-$(CONFIG_NET_DSA_TAG_EDSA) += tag_edsa.o
dsa_core-$(CONFIG_NET_DSA_TAG_TRAILER) += tag_trailer.o

# switch drivers
obj-$(CONFIG_NET_DSA_MV88E6XXX) += mv88e6xxx.o
obj-$(CONFIG_NET_DSA_MV88E6060) += mv88e6060.o
obj-$(CONFIG_NET_DSA_MV88E6123_61_65) += mv88e6123_61_65.o
obj-$(CONFIG_NET_DSA_MV88E6131) += mv88e6131.o
obj-$(CONFIG_NET_DSA_MV88E6XXX) += mv88e6xxx_drv.o
mv88e6xxx_drv-y += mv88e6xxx.o
mv88e6xxx_drv-$(CONFIG_NET_DSA_MV88E6123_61_65) += mv88e6123_61_65.o
mv88e6xxx_drv-$(CONFIG_NET_DSA_MV88E6131) += mv88e6131.o
15 changes: 1 addition & 14 deletions trunk/net/dsa/mv88e6123_61_65.c
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ static int mv88e6123_61_65_get_sset_count(struct dsa_switch *ds)
return ARRAY_SIZE(mv88e6123_61_65_hw_stats);
}

static struct dsa_switch_driver mv88e6123_61_65_switch_driver = {
struct dsa_switch_driver mv88e6123_61_65_switch_driver = {
.tag_protocol = cpu_to_be16(ETH_P_EDSA),
.priv_size = sizeof(struct mv88e6xxx_priv_state),
.probe = mv88e6123_61_65_probe,
Expand All @@ -432,16 +432,3 @@ static struct dsa_switch_driver mv88e6123_61_65_switch_driver = {
.get_ethtool_stats = mv88e6123_61_65_get_ethtool_stats,
.get_sset_count = mv88e6123_61_65_get_sset_count,
};

static int __init mv88e6123_61_65_init(void)
{
register_switch_driver(&mv88e6123_61_65_switch_driver);
return 0;
}
module_init(mv88e6123_61_65_init);

static void __exit mv88e6123_61_65_cleanup(void)
{
unregister_switch_driver(&mv88e6123_61_65_switch_driver);
}
module_exit(mv88e6123_61_65_cleanup);
15 changes: 1 addition & 14 deletions trunk/net/dsa/mv88e6131.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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);
23 changes: 23 additions & 0 deletions trunk/net/dsa/mv88e6xxx.c
Original file line number Diff line number Diff line change
Expand Up @@ -520,3 +520,26 @@ void mv88e6xxx_get_ethtool_stats(struct dsa_switch *ds,

mutex_unlock(&ps->stats_mutex);
}

static int __init mv88e6xxx_init(void)
{
#if IS_ENABLED(CONFIG_NET_DSA_MV88E6131)
register_switch_driver(&mv88e6131_switch_driver);
#endif
#if IS_ENABLED(CONFIG_NET_DSA_MV88E6123_61_65)
register_switch_driver(&mv88e6123_61_65_switch_driver);
#endif
return 0;
}
module_init(mv88e6xxx_init);

static void __exit mv88e6xxx_cleanup(void)
{
#if IS_ENABLED(CONFIG_NET_DSA_MV88E6123_61_65)
unregister_switch_driver(&mv88e6123_61_65_switch_driver);
#endif
#if IS_ENABLED(CONFIG_NET_DSA_MV88E6131)
unregister_switch_driver(&mv88e6131_switch_driver);
#endif
}
module_exit(mv88e6xxx_cleanup);
3 changes: 3 additions & 0 deletions trunk/net/dsa/mv88e6xxx.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ void mv88e6xxx_get_ethtool_stats(struct dsa_switch *ds,
int nr_stats, struct mv88e6xxx_hw_stat *stats,
int port, uint64_t *data);

extern struct dsa_switch_driver mv88e6131_switch_driver;
extern struct dsa_switch_driver mv88e6123_61_65_switch_driver;

#define REG_READ(addr, reg) \
({ \
int __ret; \
Expand Down

0 comments on commit 063a101

Please sign in to comment.