summaryrefslogtreecommitdiffstats
path: root/net/dsa/hwmon.c
diff options
context:
space:
mode:
authorFlorian Fainelli <f.fainelli@gmail.com>2017-01-08 23:52:08 +0100
committerDavid S. Miller <davem@davemloft.net>2017-01-09 21:44:50 +0100
commita82f67afe8e297834bedafa529941d9d0808caf8 (patch)
tree4e47358cacf8e32212e27b6d78f4d184e2799982 /net/dsa/hwmon.c
parentnet: dsa: Encapsulate legacy switch drivers into dsa_switch_driver (diff)
downloadlinux-a82f67afe8e297834bedafa529941d9d0808caf8.tar.xz
linux-a82f67afe8e297834bedafa529941d9d0808caf8.zip
net: dsa: Make dsa_switch_ops const
Now that we have properly encapsulated and made drivers utilize exported functions, we can switch dsa_switch_ops to be a annotated with const. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r--net/dsa/hwmon.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/dsa/hwmon.c b/net/dsa/hwmon.c
index 3a9cdf0b22b8..08831a811278 100644
--- a/net/dsa/hwmon.c
+++ b/net/dsa/hwmon.c
@@ -86,7 +86,7 @@ static umode_t dsa_hwmon_attrs_visible(struct kobject *kobj,
{
struct device *dev = container_of(kobj, struct device, kobj);
struct dsa_switch *ds = dev_get_drvdata(dev);
- struct dsa_switch_ops *ops = ds->ops;
+ const struct dsa_switch_ops *ops = ds->ops;
umode_t mode = attr->mode;
if (index == 1) {