net: make drivers to use SET_NETDEV_DEVLINK_PORT to set devlink_port
Benefit from the previously implemented tracking of netdev events in devlink code and instead of calling devlink_port_type_eth_set() and devlink_port_type_clear() to set devlink port type and link to related netdev, use SET_NETDEV_DEVLINK_PORT() macro to assign devlink_port pointer to netdevice which is about to be registered. Signed-off-by: Jiri Pirko <jiri@nvidia.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
committed by
Jakub Kicinski
parent
02a68a47ea
commit
ac73d4bf2c
@@ -90,7 +90,7 @@ int ionic_devlink_register(struct ionic *ionic)
|
||||
return err;
|
||||
}
|
||||
|
||||
devlink_port_type_eth_set(&ionic->dl_port, ionic->lif->netdev);
|
||||
SET_NETDEV_DEVLINK_PORT(ionic->lif->netdev, &ionic->dl_port);
|
||||
devlink_register(dl);
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user