netdevsim: move device registration and related code to bus.c
Move netdevsim device registration into bus.c and alongside with that the related sysfs attributes. Introduce new struct nsim_bus_dev to represent a netdevsim device on netdevsim bus. Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
925f5afedb
commit
40e4fe4ce1
@@ -199,7 +199,7 @@ static int __nsim_dev_init(struct netdevsim *ns)
|
||||
if (err)
|
||||
goto err_fib_destroy;
|
||||
|
||||
err = devlink_register(devlink, &ns->dev);
|
||||
err = devlink_register(devlink, &ns->nsim_bus_dev->dev);
|
||||
if (err)
|
||||
goto err_resources_unregister;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user