summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/qlogic/netxen
diff options
context:
space:
mode:
authorBhumika Goyal <bhumirks@gmail.com>2017-08-21 17:13:10 +0530
committerDavid S. Miller <davem@davemloft.net>2017-08-21 10:24:22 -0700
commitda6817ebc353c54c5e74676418bfa77d13e64159 (patch)
treeb30dd85e6c539e1ee604d98dcb78343410c5206e /drivers/net/ethernet/qlogic/netxen
parenta43dce93587bfb5f65fa40647977ef72a7ba6699 (diff)
downloadlwn-da6817ebc353c54c5e74676418bfa77d13e64159.tar.gz
lwn-da6817ebc353c54c5e74676418bfa77d13e64159.zip
qlogic: make device_attribute const
Make these const as they are only passed as an argument to the function device_create_file and device_remove_file and the corresponding arguments are of type const. Done using Coccinelle Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/qlogic/netxen')
-rw-r--r--drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c b/drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c
index 827de838389f..f2e8de607119 100644
--- a/drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c
+++ b/drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c
@@ -2828,7 +2828,7 @@ netxen_show_bridged_mode(struct device *dev,
return sprintf(buf, "%d\n", bridged_mode);
}
-static struct device_attribute dev_attr_bridged_mode = {
+static const struct device_attribute dev_attr_bridged_mode = {
.attr = {.name = "bridged_mode", .mode = (S_IRUGO | S_IWUSR)},
.show = netxen_show_bridged_mode,
.store = netxen_store_bridged_mode,
@@ -2860,7 +2860,7 @@ netxen_show_diag_mode(struct device *dev,
!!(adapter->flags & NETXEN_NIC_DIAG_ENABLED));
}
-static struct device_attribute dev_attr_diag_mode = {
+static const struct device_attribute dev_attr_diag_mode = {
.attr = {.name = "diag_mode", .mode = (S_IRUGO | S_IWUSR)},
.show = netxen_show_diag_mode,
.store = netxen_store_diag_mode,