Commit 53bade8a authored by Florian Fainelli's avatar Florian Fainelli Committed by David S. Miller

net: dsa: Utilize dsa_slave_dev_check()

Instead of open coding the check.
Signed-off-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Reviewed-by: default avatarVivien Didelot <vivien.didelot@savoirfairelinux.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent eccaa9e5
...@@ -1294,7 +1294,7 @@ static int dsa_slave_netdevice_event(struct notifier_block *nb, ...@@ -1294,7 +1294,7 @@ static int dsa_slave_netdevice_event(struct notifier_block *nb,
{ {
struct net_device *dev = netdev_notifier_info_to_dev(ptr); struct net_device *dev = netdev_notifier_info_to_dev(ptr);
if (dev->netdev_ops != &dsa_slave_netdev_ops) if (!dsa_slave_dev_check(dev))
return NOTIFY_DONE; return NOTIFY_DONE;
if (event == NETDEV_CHANGEUPPER) if (event == NETDEV_CHANGEUPPER)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment