diff options
author | Florian Fainelli <f.fainelli@gmail.com> | 2014-04-28 14:14:28 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-04-30 13:31:25 -0400 |
commit | a22adce5f97c172398082bf9a713ccfba6c2364f (patch) | |
tree | a16c97c9fee55c30c5790725962385ff5437a668 /drivers/net/dsa/mv88e6131.c | |
parent | 7fa857ed041537ee6cbc7ee4ab0204a1231cfcb9 (diff) |
net: dsa: update DSA drivers to use ds_to_priv
Use the helper function to retrieve the driver private context instead of
using (void *)(ds + 1).
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/dsa/mv88e6131.c')
-rw-r--r-- | drivers/net/dsa/mv88e6131.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/dsa/mv88e6131.c b/drivers/net/dsa/mv88e6131.c index dadfafba64e9..953bc6a49e59 100644 --- a/drivers/net/dsa/mv88e6131.c +++ b/drivers/net/dsa/mv88e6131.c | |||
@@ -155,7 +155,7 @@ static int mv88e6131_setup_global(struct dsa_switch *ds) | |||
155 | 155 | ||
156 | static int mv88e6131_setup_port(struct dsa_switch *ds, int p) | 156 | static int mv88e6131_setup_port(struct dsa_switch *ds, int p) |
157 | { | 157 | { |
158 | struct mv88e6xxx_priv_state *ps = (void *)(ds + 1); | 158 | struct mv88e6xxx_priv_state *ps = ds_to_priv(ds); |
159 | int addr = REG_PORT(p); | 159 | int addr = REG_PORT(p); |
160 | u16 val; | 160 | u16 val; |
161 | 161 | ||
@@ -274,7 +274,7 @@ static int mv88e6131_setup_port(struct dsa_switch *ds, int p) | |||
274 | 274 | ||
275 | static int mv88e6131_setup(struct dsa_switch *ds) | 275 | static int mv88e6131_setup(struct dsa_switch *ds) |
276 | { | 276 | { |
277 | struct mv88e6xxx_priv_state *ps = (void *)(ds + 1); | 277 | struct mv88e6xxx_priv_state *ps = ds_to_priv(ds); |
278 | int i; | 278 | int i; |
279 | int ret; | 279 | int ret; |
280 | 280 | ||