netdevsim: add bus attributes to add new and delete devices
Add a way to add new netdevsim device on netdevsim bus and also to delete existing netdevsim device from the bus. Track the bus devices in using a list. 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
57ce977495
commit
f9d9db47d3
@@ -386,7 +386,7 @@ static int nsim_newlink(struct net *src_net, struct net_device *dev,
|
||||
if (IS_ERR(ns->sdev))
|
||||
return PTR_ERR(ns->sdev);
|
||||
|
||||
ns->nsim_bus_dev = nsim_bus_dev_new();
|
||||
ns->nsim_bus_dev = nsim_bus_dev_new(~0, 0);
|
||||
if (IS_ERR(ns->nsim_bus_dev)) {
|
||||
err = PTR_ERR(ns->nsim_bus_dev);
|
||||
goto err_sdev_put;
|
||||
|
Reference in New Issue
Block a user