diff options
author | Jiri Pirko <jiri@nvidia.com> | 2022-11-02 19:02:09 +0300 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2022-11-04 06:48:36 +0300 |
commit | 8eba37f7e9bc82fac08f31d318e36f341494442d (patch) | |
tree | 2c94d5fb46fea7196bd281dbc2a0e1e2f9a4a30b /net/core/net-sysfs.c | |
parent | e705a621c071b43e4ea971abb70d7677dc640c27 (diff) | |
download | linux-8eba37f7e9bc82fac08f31d318e36f341494442d.tar.xz |
net: devlink: use devlink_port pointer instead of ndo_get_devlink_port
Use newly introduced devlink_port pointer instead of getting it calling
to ndo_get_devlink_port op.
Signed-off-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/core/net-sysfs.c')
-rw-r--r-- | net/core/net-sysfs.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c index 8409d41405df..679b84cc8794 100644 --- a/net/core/net-sysfs.c +++ b/net/core/net-sysfs.c @@ -532,7 +532,7 @@ static ssize_t phys_port_name_show(struct device *dev, * returning early without hitting the trylock/restart below. */ if (!netdev->netdev_ops->ndo_get_phys_port_name && - !netdev->netdev_ops->ndo_get_devlink_port) + !netdev->devlink_port) return -EOPNOTSUPP; if (!rtnl_trylock()) @@ -562,7 +562,7 @@ static ssize_t phys_switch_id_show(struct device *dev, * because recurse is false when calling dev_get_port_parent_id. */ if (!netdev->netdev_ops->ndo_get_port_parent_id && - !netdev->netdev_ops->ndo_get_devlink_port) + !netdev->devlink_port) return -EOPNOTSUPP; if (!rtnl_trylock()) |