Merge tag 'driver-core-6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git...
[linux-2.6-microblaze.git] / net / core / net-sysfs.c
index 03a61d1..ca55dd7 100644 (file)
@@ -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())