summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorstephen hemminger <stephen@networkplumber.org>2017-08-18 23:46:20 +0300
committerDavid S. Miller <davem@davemloft.net>2017-08-19 08:37:12 +0300
commitb793dc5c6edfb106fd57d12ad6aca64bf160b403 (patch)
tree0bf920a37fb93596630bd15241ae0711fc549b1c /include/linux
parentd0d6683716791b2a2761a1bb025c613eb73da6c3 (diff)
downloadlinux-b793dc5c6edfb106fd57d12ad6aca64bf160b403.tar.xz
net: constify netdev_class_file
These functions are wrapper arount class_create_file which can take a const attribute. Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/netdevice.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 0f1c4cb2441e..eaa77bd9cb80 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -4013,17 +4013,17 @@ static inline netdev_tx_t netdev_start_xmit(struct sk_buff *skb, struct net_devi
return rc;
}
-int netdev_class_create_file_ns(struct class_attribute *class_attr,
+int netdev_class_create_file_ns(const struct class_attribute *class_attr,
const void *ns);
-void netdev_class_remove_file_ns(struct class_attribute *class_attr,
+void netdev_class_remove_file_ns(const struct class_attribute *class_attr,
const void *ns);
-static inline int netdev_class_create_file(struct class_attribute *class_attr)
+static inline int netdev_class_create_file(const struct class_attribute *class_attr)
{
return netdev_class_create_file_ns(class_attr, NULL);
}
-static inline void netdev_class_remove_file(struct class_attribute *class_attr)
+static inline void netdev_class_remove_file(const struct class_attribute *class_attr)
{
netdev_class_remove_file_ns(class_attr, NULL);
}