1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2025-04-21 12:27:27 +03:00

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
This commit is contained in:
juhosg
2010-07-15 13:05:06 +00:00
parent 320e8ef881
commit e2d43315df
3 changed files with 15 additions and 22 deletions

View File

@@ -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 */