OSDN Git Service

net: dsa: simplify netdevice events handling
authorVivien Didelot <vivien.didelot@savoirfairelinux.com>
Fri, 3 Feb 2017 18:20:17 +0000 (13:20 -0500)
committerDavid S. Miller <davem@davemloft.net>
Mon, 6 Feb 2017 21:53:28 +0000 (16:53 -0500)
commit8e92ab3a426e04dc355b196e3b4474f633025a3b
tree015463fe11e09ddeb31ffcf7b2a08550fef29814
parent88e4f0ca4e4e7760e4aad544789c5408219886d5
net: dsa: simplify netdevice events handling

Simplify the code handling the slave netdevice notifier call by
providing a dsa_slave_changeupper helper for NETDEV_CHANGEUPPER, and so
on (only this event is supported at the moment.)

Return NOTIFY_DONE when we did not care about an event, and NOTIFY_OK
when we were concerned but no error occurred, as the API suggests.

Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/dsa/slave.c