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)
commitb0ab2fabb5b91da99c189db02e91ae10bc8355c5
treed3d9aa5bb93078b5fcf027c38a18fba652e5007b
parent9bf2b8c280b5c02ca8a9e75263bf3ca998fed144
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