diff options
author | Vivien Didelot <vivien.didelot@gmail.com> | 2019-10-21 23:51:15 +0300 |
---|---|---|
committer | Jakub Kicinski <jakub.kicinski@netronome.com> | 2019-10-22 22:37:06 +0300 |
commit | 68bb8ea8ad0d497c28ed47423246b1ab20f26976 (patch) | |
tree | 8e7c4ca7da4bf3171ca335d0c85d752d6f3d66b9 /include | |
parent | 88652bf8ce4b91c49769a2a49c17dc44b85b4fa2 (diff) | |
download | linux-68bb8ea8ad0d497c28ed47423246b1ab20f26976.tar.xz |
net: dsa: use dsa_to_port helper everywhere
Do not let the drivers access the ds->ports static array directly
while there is a dsa_to_port helper for this purpose.
At the same time, un-const this helper since the SJA1105 driver
assigns the priv member of the returned dsa_port structure.
Signed-off-by: Vivien Didelot <vivien.didelot@gmail.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/net/dsa.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/net/dsa.h b/include/net/dsa.h index 8c3ea0530f65..2e4fe2f8962b 100644 --- a/include/net/dsa.h +++ b/include/net/dsa.h @@ -278,7 +278,7 @@ struct dsa_switch { struct dsa_port ports[]; }; -static inline const struct dsa_port *dsa_to_port(struct dsa_switch *ds, int p) +static inline struct dsa_port *dsa_to_port(struct dsa_switch *ds, int p) { return &ds->ports[p]; } |