aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/qlge
diff options
context:
space:
mode:
authorstephen hemminger <shemminger@vyatta.com>2011-04-14 01:51:52 -0400
committerDavid S. Miller <davem@davemloft.net>2011-04-15 00:53:43 -0400
commitef9c7ab4a97d53d9cb4912d13e142f52a30ecd54 (patch)
tree942dffdc67367bd23314c12ebabfd3ce4ce68735 /drivers/net/qlge
parent6c8c2513c86c589a819c161c9abbdea2a3d56f5e (diff)
qlge: make nic_operations struct const
The struct nic_operations is just function pointers and should be declared const for added security. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/qlge')
-rw-r--r--drivers/net/qlge/qlge.h2
-rw-r--r--drivers/net/qlge/qlge_main.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/qlge/qlge.h b/drivers/net/qlge/qlge.h
index 4757c59a07a2..d32850715f5c 100644
--- a/drivers/net/qlge/qlge.h
+++ b/drivers/net/qlge/qlge.h
@@ -2134,7 +2134,7 @@ struct ql_adapter {
2134 struct delayed_work mpi_idc_work; 2134 struct delayed_work mpi_idc_work;
2135 struct delayed_work mpi_core_to_log; 2135 struct delayed_work mpi_core_to_log;
2136 struct completion ide_completion; 2136 struct completion ide_completion;
2137 struct nic_operations *nic_ops; 2137 const struct nic_operations *nic_ops;
2138 u16 device_id; 2138 u16 device_id;
2139 struct timer_list timer; 2139 struct timer_list timer;
2140 atomic_t lb_count; 2140 atomic_t lb_count;
diff --git a/drivers/net/qlge/qlge_main.c b/drivers/net/qlge/qlge_main.c
index 5bb311945436..f61e717adac4 100644
--- a/drivers/net/qlge/qlge_main.c
+++ b/drivers/net/qlge/qlge_main.c
@@ -4412,12 +4412,12 @@ error:
4412 rtnl_unlock(); 4412 rtnl_unlock();
4413} 4413}
4414 4414
4415static struct nic_operations qla8012_nic_ops = { 4415static const struct nic_operations qla8012_nic_ops = {
4416 .get_flash = ql_get_8012_flash_params, 4416 .get_flash = ql_get_8012_flash_params,
4417 .port_initialize = ql_8012_port_initialize, 4417 .port_initialize = ql_8012_port_initialize,
4418}; 4418};
4419 4419
4420static struct nic_operations qla8000_nic_ops = { 4420static const struct nic_operations qla8000_nic_ops = {
4421 .get_flash = ql_get_8000_flash_params, 4421 .get_flash = ql_get_8000_flash_params,
4422 .port_initialize = ql_8000_port_initialize, 4422 .port_initialize = ql_8000_port_initialize,
4423}; 4423};