浏览代码

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 <[email protected]>

SVN-Revision: 43106
John Crispin 11 年之前
父节点
当前提交
ab5d70e046
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      target/linux/generic/files/drivers/net/phy/swconfig.c

+ 1 - 1
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);