]> git.baikalelectronics.ru Git - kernel.git/commit
rtnetlink: allow to register ops without ops->setup set
authorJiri Pirko <jiri@resnulli.us>
Thu, 26 Jun 2014 07:58:25 +0000 (09:58 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 1 Jul 2014 21:40:17 +0000 (14:40 -0700)
commit140b89a8dc034a5767bb9e43ffc6d3ca17777106
treed3d9aa5bb93078b5fcf027c38a18fba652e5007b
parentbfeca5a8a6dd8def3b6e282159c8f330763bc459
rtnetlink: allow to register ops without ops->setup set

So far, it is assumed that ops->setup is filled up. But there might be
case that ops might make sense even without ->setup. In that case,
forbid to newlink and dellink.

This allows to register simple rtnl link ops containing only ->kind.
That allows consistent way of passing device kind (either device-kind or
slave-kind) to userspace.

Signed-off-by: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/dev.c
net/core/rtnetlink.c