summaryrefslogtreecommitdiff
path: root/net/devlink
diff options
context:
space:
mode:
authorJiri Pirko <jiri@nvidia.com>2023-05-26 12:28:33 +0200
committerJakub Kicinski <kuba@kernel.org>2023-05-30 10:32:20 -0700
commit65a4c44bf9375a5d13287ee1e389b512e83f37eb (patch)
treed78f3e57b0d34c4062d08445d0909a2f9b898ecb /net/devlink
parent8a756d91d26c1fe941d6839b41d385a4f84ac453 (diff)
devlink: move port_type_set() op into devlink_port_ops
Move port_type_set() from devlink_ops into newly introduced devlink_port_ops. Signed-off-by: Jiri Pirko <jiri@nvidia.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/devlink')
-rw-r--r--net/devlink/leftover.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/net/devlink/leftover.c b/net/devlink/leftover.c
index 1ed95c76cf67..d69e278ae15a 100644
--- a/net/devlink/leftover.c
+++ b/net/devlink/leftover.c
@@ -1137,14 +1137,13 @@ static int devlink_port_type_set(struct devlink_port *devlink_port,
{
int err;
- if (!devlink_port->devlink->ops->port_type_set)
+ if (!devlink_port->ops->port_type_set)
return -EOPNOTSUPP;
if (port_type == devlink_port->type)
return 0;
- err = devlink_port->devlink->ops->port_type_set(devlink_port,
- port_type);
+ err = devlink_port->ops->port_type_set(devlink_port, port_type);
if (err)
return err;