sfc: register devlink port with ops
Use newly introduce devlink port registration function variant and register devlink port passing ops. Signed-off-by: Jiri Pirko <jiri@nvidia.com> Acked-by: Martin Habets <habetsm.xilinx@gmail.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
65a4c44bf9
commit
7bfb3d0a83
@ -25,6 +25,10 @@ struct efx_devlink {
|
||||
};
|
||||
|
||||
#ifdef CONFIG_SFC_SRIOV
|
||||
|
||||
static const struct devlink_port_ops sfc_devlink_port_ops = {
|
||||
};
|
||||
|
||||
static void efx_devlink_del_port(struct devlink_port *dl_port)
|
||||
{
|
||||
if (!dl_port)
|
||||
@ -57,7 +61,9 @@ static int efx_devlink_add_port(struct efx_nic *efx,
|
||||
|
||||
mport->dl_port.index = mport->mport_id;
|
||||
|
||||
return devl_port_register(efx->devlink, &mport->dl_port, mport->mport_id);
|
||||
return devl_port_register_with_ops(efx->devlink, &mport->dl_port,
|
||||
mport->mport_id,
|
||||
&sfc_devlink_port_ops);
|
||||
}
|
||||
|
||||
static int efx_devlink_port_addr_get(struct devlink_port *port, u8 *hw_addr,
|
||||
|
Loading…
x
Reference in New Issue
Block a user