From 0961aa1ea94312c3f06e13e30461c20540678933 Mon Sep 17 00:00:00 2001 From: blogic Date: Wed, 29 Oct 2014 18:51:06 +0000 Subject: [PATCH] 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 git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43106 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- target/linux/generic/files/drivers/net/phy/swconfig.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/generic/files/drivers/net/phy/swconfig.c b/target/linux/generic/files/drivers/net/phy/swconfig.c index ba9136c34f..de1dde22cf 100644 --- a/target/linux/generic/files/drivers/net/phy/swconfig.c +++ b/target/linux/generic/files/drivers/net/phy/swconfig.c @@ -1079,7 +1079,7 @@ register_switch(struct switch_dev *dev, struct net_device *netdev) /* fill device name */ snprintf(dev->devname, IFNAMSIZ, SWCONFIG_DEVNAME, i); - list_add(&dev->dev_list, &swdevs); + list_add_last(&dev->dev_list, &swdevs); swconfig_unlock(); err = swconfig_create_led_trigger(dev); -- 2.11.0