diff options
author | Gabor Juhos <juhosg@openwrt.org> | 2010-07-15 13:05:06 +0000 |
---|---|---|
committer | Gabor Juhos <juhosg@openwrt.org> | 2010-07-15 13:05:06 +0000 |
commit | 107c35691636e4f7793e9a7d2a5023b8184317cc (patch) | |
tree | 000d41de5ed29dcf1b96215aecad470682f88772 /target/linux/generic/files/drivers/net/phy/rtl8366_smi.h | |
parent | 1f37fff7de8c8ebed6128b580ba991535a0586c8 (diff) | |
download | upstream-107c35691636e4f7793e9a7d2a5023b8184317cc.tar.gz upstream-107c35691636e4f7793e9a7d2a5023b8184317cc.tar.bz2 upstream-107c35691636e4f7793e9a7d2a5023b8184317cc.zip |
generic: rtl8366: move switch device to the rtl8366_smi struct
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@22193 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/generic/files/drivers/net/phy/rtl8366_smi.h')
-rw-r--r-- | target/linux/generic/files/drivers/net/phy/rtl8366_smi.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/target/linux/generic/files/drivers/net/phy/rtl8366_smi.h b/target/linux/generic/files/drivers/net/phy/rtl8366_smi.h index 3b639f2b69..bd16cbe55e 100644 --- a/target/linux/generic/files/drivers/net/phy/rtl8366_smi.h +++ b/target/linux/generic/files/drivers/net/phy/rtl8366_smi.h @@ -12,6 +12,7 @@ #define _RTL8366_SMI_H #include <linux/phy.h> +#include <linux/switch.h> struct rtl8366_smi_ops; struct rtl8366_vlan_ops; @@ -34,6 +35,7 @@ struct rtl8366_smi { spinlock_t lock; struct mii_bus *mii_bus; int mii_irq[PHY_MAX_ADDR]; + struct switch_dev sw_dev; unsigned int cpu_port; unsigned int num_ports; @@ -101,4 +103,9 @@ int rtl8366_set_pvid(struct rtl8366_smi *smi, unsigned port, unsigned vid); int rtl8366_debugfs_open(struct inode *inode, struct file *file); #endif +static inline struct rtl8366_smi *sw_to_rtl8366_smi(struct switch_dev *sw) +{ + return container_of(sw, struct rtl8366_smi, sw_dev); +} + #endif /* _RTL8366_SMI_H */ |