bnxt_en: use SWITCHDEV_SET_OPS() for setting vf_rep_switchdev_ops
authorSathya Perla <[email protected]>
Tue, 25 Jul 2017 17:28:40 +0000 (13:28 -0400)
committerDavid S. Miller <[email protected]>
Tue, 25 Jul 2017 19:48:19 +0000 (12:48 -0700)
This fixes the build error:
‘struct net_device’ has no member named ‘switchdev_ops’

Reported-by: kbuild test robot <[email protected]>
Fixes: c124a62ff2dd ("bnxt_en: add support for port_attr_get and and get_phys_port_name")
Signed-off-by: Sathya Perla <[email protected]>
Signed-off-by: Michael Chan <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c

index a52e292be0524d240cbd6ae991e55aaed656031f..c00352a4c1f0c6bd5bb70d39316f7f13bfda2e95 100644 (file)
@@ -304,7 +304,7 @@ static void bnxt_vf_rep_netdev_init(struct bnxt *bp, struct bnxt_vf_rep *vf_rep,
 
        dev->netdev_ops = &bnxt_vf_rep_netdev_ops;
        dev->ethtool_ops = &bnxt_vf_rep_ethtool_ops;
-       dev->switchdev_ops = &bnxt_vf_rep_switchdev_ops;
+       SWITCHDEV_SET_OPS(dev, &bnxt_vf_rep_switchdev_ops);
        /* Just inherit all the featues of the parent PF as the VF-R
         * uses the RX/TX rings of the parent PF
         */