Skip to content

Commit

Permalink
net: dsa: Utilize dsa_slave_dev_check()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Florian Fainelli authored and David S. Miller committed Sep 20, 2017
1 parent eccaa9e commit 53bade8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/dsa/slave.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 53bade8

Please sign in to comment.