Skip to content

Commit 0211b8f

Browse files
Yisen.Zhuang\(Zhuangyuzeng\)davem330
authored andcommitted
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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 1ffdfac commit 0211b8f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/net/ethernet/hisilicon/hns/hns_dsaf_mac.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -834,15 +834,15 @@ int hns_mac_init(struct dsaf_device *dsaf_dev)
834834
struct fwnode_handle *child;
835835

836836
device_for_each_child_node(dsaf_dev->dev, child) {
837-
ret = fwnode_property_read_u32(child, "port-id", &port_id);
837+
ret = fwnode_property_read_u32(child, "reg", &port_id);
838838
if (ret) {
839839
dev_err(dsaf_dev->dev,
840-
"get port-id fail, ret=%d!\n", ret);
840+
"get reg fail, ret=%d!\n", ret);
841841
return ret;
842842
}
843843
if (port_id >= max_port_num) {
844844
dev_err(dsaf_dev->dev,
845-
"port-id(%u) out of range!\n", port_id);
845+
"reg(%u) out of range!\n", port_id);
846846
return -EINVAL;
847847
}
848848
mac_cb = devm_kzalloc(dsaf_dev->dev, sizeof(*mac_cb),

0 commit comments

Comments
 (0)