]> git.baikalelectronics.ru Git - kernel.git/commit
netdevsim: move vfconfig to nsim_dev
authorJakub Kicinski <kuba@kernel.org>
Sat, 30 Oct 2021 23:15:02 +0000 (16:15 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 1 Nov 2021 13:29:41 +0000 (13:29 +0000)
commit7cbb16f91022ce76b7195ffc905b0e6acd12e118
tree7f9299b4a6f2511bb22ad59739bc755ac1f5991c
parentc02b189de80956201db4aee0cfa94bf32815a973
netdevsim: move vfconfig to nsim_dev

When netdevsim got split into the faux bus vfconfig ended
up in the bus device (think pci_dev) which is strange because
it contains very networky not to say netdevy information.
Move it to nsim_dev, which is the driver "priv" structure
for the device.

To make sure we don't race with probe/remove take
the device lock (much like PCI).

While at it remove the NULL-checking of vfconfigs.
It appears to be pointless.

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/netdevsim/bus.c
drivers/net/netdevsim/dev.c
drivers/net/netdevsim/netdev.c
drivers/net/netdevsim/netdevsim.h