net: dsa: Utilize dsa_slave_dev_check()

Instead of open coding the check.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Reviewed-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Florian Fainelli 2017-09-19 18:00:37 -07:00 committed by David S. Miller
parent eccaa9e51b
commit 53bade8a33
1 changed files with 1 additions and 1 deletions

View File

@ -1294,7 +1294,7 @@ static int dsa_slave_netdevice_event(struct notifier_block *nb,
{
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;
if (event == NETDEV_CHANGEUPPER)