From: Vivien Didelot Date: Wed, 2 Aug 2017 19:48:25 +0000 (-0400) Subject: net: dsa: bcm_sf2: dst in not an array X-Git-Tag: v4.14-rc1~130^2~384 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3a8f6f874fa1ac004157fb3df742a5034718a2ce;p=platform%2Fkernel%2Flinux-rpi3.git net: dsa: bcm_sf2: dst in not an array It's been a while now since ds->dst is not an array anymore, but a simple pointer to a dsa_switch_tree. Fortunately, SF2 does not support multi-chip and thus ds->index is always 0. This patch substitutes 'ds->dst[ds->index].' with 'ds->dst->'. Signed-off-by: Vivien Didelot Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller --- diff --git a/drivers/net/dsa/bcm_sf2.c b/drivers/net/dsa/bcm_sf2.c index 6bbfa6e..558667c 100644 --- a/drivers/net/dsa/bcm_sf2.c +++ b/drivers/net/dsa/bcm_sf2.c @@ -788,7 +788,7 @@ static int bcm_sf2_sw_resume(struct dsa_switch *ds) static void bcm_sf2_sw_get_wol(struct dsa_switch *ds, int port, struct ethtool_wolinfo *wol) { - struct net_device *p = ds->dst[ds->index].cpu_dp->netdev; + struct net_device *p = ds->dst->cpu_dp->netdev; struct bcm_sf2_priv *priv = bcm_sf2_to_priv(ds); struct ethtool_wolinfo pwol; @@ -811,7 +811,7 @@ static void bcm_sf2_sw_get_wol(struct dsa_switch *ds, int port, static int bcm_sf2_sw_set_wol(struct dsa_switch *ds, int port, struct ethtool_wolinfo *wol) { - struct net_device *p = ds->dst[ds->index].cpu_dp->netdev; + struct net_device *p = ds->dst->cpu_dp->netdev; struct bcm_sf2_priv *priv = bcm_sf2_to_priv(ds); s8 cpu_port = ds->dst->cpu_dp->index; struct ethtool_wolinfo pwol;