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:
parent
eccaa9e51b
commit
53bade8a33
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue