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:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user