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>
This commit is contained in:
committed by
David S. Miller
parent
6c8c2513c8
commit
ef9c7ab4a9
@@ -2134,7 +2134,7 @@ struct ql_adapter {
|
|||||||
struct delayed_work mpi_idc_work;
|
struct delayed_work mpi_idc_work;
|
||||||
struct delayed_work mpi_core_to_log;
|
struct delayed_work mpi_core_to_log;
|
||||||
struct completion ide_completion;
|
struct completion ide_completion;
|
||||||
struct nic_operations *nic_ops;
|
const struct nic_operations *nic_ops;
|
||||||
u16 device_id;
|
u16 device_id;
|
||||||
struct timer_list timer;
|
struct timer_list timer;
|
||||||
atomic_t lb_count;
|
atomic_t lb_count;
|
||||||
|
@@ -4412,12 +4412,12 @@ error:
|
|||||||
rtnl_unlock();
|
rtnl_unlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct nic_operations qla8012_nic_ops = {
|
static const struct nic_operations qla8012_nic_ops = {
|
||||||
.get_flash = ql_get_8012_flash_params,
|
.get_flash = ql_get_8012_flash_params,
|
||||||
.port_initialize = ql_8012_port_initialize,
|
.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,
|
.get_flash = ql_get_8000_flash_params,
|
||||||
.port_initialize = ql_8000_port_initialize,
|
.port_initialize = ql_8000_port_initialize,
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user