2
0
forked from Ivasoft/openwrt

swconfig: Add generic switch identifiers

Also make switches available under a generic name "switch<num>" for device
name agnostic access. The old device name is used as an alias for backward
compatibility.

SVN-Revision: 27800
This commit is contained in:
Jonas Gorski
2011-07-27 18:00:18 +00:00
parent 8ff7756e82
commit eaa935658b
8 changed files with 49 additions and 16 deletions

View File

@@ -1116,7 +1116,7 @@ static int rtl8366rb_switch_init(struct rtl8366_smi *smi)
dev->ports = RTL8366RB_NUM_PORTS;
dev->vlans = RTL8366RB_NUM_VIDS;
dev->ops = &rtl8366_ops;
dev->devname = dev_name(smi->parent);
dev->alias = dev_name(smi->parent);
err = register_switch(dev, NULL);
if (err)