]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
qlge: make nic_operations struct const
authorstephen hemminger <shemminger@vyatta.com>
Thu, 14 Apr 2011 05:51:52 +0000 (05:51 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 15 Apr 2011 04:53:43 +0000 (21:53 -0700)
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>
drivers/net/qlge/qlge.h
drivers/net/qlge/qlge_main.c

index 4757c59a07a27997bd2145470e8eae419515b53b..d32850715f5c309350ca8b29d81267c6c33e3735 100644 (file)
@@ -2134,7 +2134,7 @@ struct ql_adapter {
        struct delayed_work mpi_idc_work;
        struct delayed_work mpi_core_to_log;
        struct completion ide_completion;
-       struct nic_operations *nic_ops;
+       const struct nic_operations *nic_ops;
        u16 device_id;
        struct timer_list timer;
        atomic_t lb_count;
index 5bb311945436ebc514b57477ef54c970ddc27886..f61e717adac42d39d80eff5d711621448b77e12d 100644 (file)
@@ -4412,12 +4412,12 @@ error:
        rtnl_unlock();
 }
 
-static struct nic_operations qla8012_nic_ops = {
+static const struct nic_operations qla8012_nic_ops = {
        .get_flash              = ql_get_8012_flash_params,
        .port_initialize        = ql_8012_port_initialize,
 };
 
-static struct nic_operations qla8000_nic_ops = {
+static const struct nic_operations qla8000_nic_ops = {
        .get_flash              = ql_get_8000_flash_params,
        .port_initialize        = ql_8000_port_initialize,
 };