net: devlink: introduce a flag to indicate devlink port being registered
Instead of relying on devlink pointer not being initialized, introduce an extra flag to indicate if devlink port is registered. This is needed as later on devlink pointer is going to be initialized even in case devlink port is not registered yet. Signed-off-by: Jiri Pirko <jiri@nvidia.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
3fcb698d9c
commit
081adcfe93
2 changed files with 6 additions and 3 deletions
|
|
@ -129,7 +129,8 @@ struct devlink_port {
|
|||
void *type_dev;
|
||||
struct devlink_port_attrs attrs;
|
||||
u8 attrs_set:1,
|
||||
switch_port:1;
|
||||
switch_port:1,
|
||||
registered:1;
|
||||
struct delayed_work type_warn_dw;
|
||||
struct list_head reporter_list;
|
||||
struct mutex reporters_lock; /* Protects reporter_list */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue