diff options
author | Yisen.Zhuang\(Zhuangyuzeng\) <Yisen.Zhuang@huawei.com> | 2016-04-28 15:09:02 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-04-29 13:39:03 -0400 |
commit | 0211b8fb5dd750357b3113a7c40b879c4a055a98 (patch) | |
tree | a235c17a918575d098a49771d3ffe118a21a7f0a /drivers/net/ethernet/hisilicon | |
parent | 1ffdfac99f36555b66c5b9d979c855a9c1a4503b (diff) | |
download | talos-obmc-linux-0211b8fb5dd750357b3113a7c40b879c4a055a98.tar.gz talos-obmc-linux-0211b8fb5dd750357b3113a7c40b879c4a055a98.zip |
net: hns: change port-id property to reg property in dsaf port node
Indexes should generally be avoided. So we use reg rather than port-id to
index ports.
Signed-off-by: Yisen Zhuang <yisen.zhuang@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/hisilicon')
-rw-r--r-- | drivers/net/ethernet/hisilicon/hns/hns_dsaf_mac.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_mac.c b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_mac.c index 210ba8974a8b..611581fccf2a 100644 --- a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_mac.c +++ b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_mac.c @@ -834,15 +834,15 @@ int hns_mac_init(struct dsaf_device *dsaf_dev) struct fwnode_handle *child; device_for_each_child_node(dsaf_dev->dev, child) { - ret = fwnode_property_read_u32(child, "port-id", &port_id); + ret = fwnode_property_read_u32(child, "reg", &port_id); if (ret) { dev_err(dsaf_dev->dev, - "get port-id fail, ret=%d!\n", ret); + "get reg fail, ret=%d!\n", ret); return ret; } if (port_id >= max_port_num) { dev_err(dsaf_dev->dev, - "port-id(%u) out of range!\n", port_id); + "reg(%u) out of range!\n", port_id); return -EINVAL; } mac_cb = devm_kzalloc(dsaf_dev->dev, sizeof(*mac_cb), |