mirror of https://github.com/hak5/openwrt.git
swconfig: "swconfig list" shows devices in reverse order
Boards that have more than one swconfig enabled switch will show the devices in reverse order when call swconfig list. Fix this by using list_add_tail(). Signed-off-by: John Crispin <blogic@openwrt.org> SVN-Revision: 43106lede-17.01
parent
c0bf47232a
commit
ab5d70e046
|
@ -1079,7 +1079,7 @@ register_switch(struct switch_dev *dev, struct net_device *netdev)
|
||||||
/* fill device name */
|
/* fill device name */
|
||||||
snprintf(dev->devname, IFNAMSIZ, SWCONFIG_DEVNAME, i);
|
snprintf(dev->devname, IFNAMSIZ, SWCONFIG_DEVNAME, i);
|
||||||
|
|
||||||
list_add(&dev->dev_list, &swdevs);
|
list_add_last(&dev->dev_list, &swdevs);
|
||||||
swconfig_unlock();
|
swconfig_unlock();
|
||||||
|
|
||||||
err = swconfig_create_led_trigger(dev);
|
err = swconfig_create_led_trigger(dev);
|
||||||
|
|
Loading…
Reference in New Issue