Commit b793dc5c authored by stephen hemminger's avatar stephen hemminger Committed by David S. Miller

net: constify netdev_class_file

These functions are wrapper arount class_create_file which can take a
const attribute.
Signed-off-by: default avatarStephen Hemminger <sthemmin@microsoft.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent d0d66837
...@@ -4013,17 +4013,17 @@ static inline netdev_tx_t netdev_start_xmit(struct sk_buff *skb, struct net_devi ...@@ -4013,17 +4013,17 @@ static inline netdev_tx_t netdev_start_xmit(struct sk_buff *skb, struct net_devi
return rc; 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); 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); 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); 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); netdev_class_remove_file_ns(class_attr, NULL);
} }
......
...@@ -1618,14 +1618,14 @@ int netdev_register_kobject(struct net_device *ndev) ...@@ -1618,14 +1618,14 @@ int netdev_register_kobject(struct net_device *ndev)
return error; return error;
} }
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) const void *ns)
{ {
return class_create_file_ns(&net_class, class_attr, ns); return class_create_file_ns(&net_class, class_attr, ns);
} }
EXPORT_SYMBOL(netdev_class_create_file_ns); EXPORT_SYMBOL(netdev_class_create_file_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) const void *ns)
{ {
class_remove_file_ns(&net_class, class_attr, ns); class_remove_file_ns(&net_class, class_attr, ns);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment