diff options
author | stephen hemminger <shemminger@vyatta.com> | 2011-04-14 01:50:12 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-04-15 00:53:42 -0400 |
commit | 6c8c2513c86c589a819c161c9abbdea2a3d56f5e (patch) | |
tree | 043371fbd07fce16159abf9d58cfd0df35b99268 /drivers/net/sfc/efx.c | |
parent | 44f4d5a27ee63ec80d498e0d0673605d5ce1427d (diff) |
sfc: make function tables const
The phy, mac, and board information structures should be const.
Since tables contain function pointer this improves security
(at least theoretically).
Compile tested only.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Acked-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/sfc/efx.c')
-rw-r--r-- | drivers/net/sfc/efx.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/sfc/efx.c b/drivers/net/sfc/efx.c index db72a6e054e1..c8871b2db38c 100644 --- a/drivers/net/sfc/efx.c +++ b/drivers/net/sfc/efx.c | |||
@@ -2245,7 +2245,7 @@ static bool efx_port_dummy_op_poll(struct efx_nic *efx) | |||
2245 | return false; | 2245 | return false; |
2246 | } | 2246 | } |
2247 | 2247 | ||
2248 | static struct efx_phy_operations efx_dummy_phy_operations = { | 2248 | static const struct efx_phy_operations efx_dummy_phy_operations = { |
2249 | .init = efx_port_dummy_op_int, | 2249 | .init = efx_port_dummy_op_int, |
2250 | .reconfigure = efx_port_dummy_op_int, | 2250 | .reconfigure = efx_port_dummy_op_int, |
2251 | .poll = efx_port_dummy_op_poll, | 2251 | .poll = efx_port_dummy_op_poll, |
@@ -2261,7 +2261,7 @@ static struct efx_phy_operations efx_dummy_phy_operations = { | |||
2261 | /* This zeroes out and then fills in the invariants in a struct | 2261 | /* This zeroes out and then fills in the invariants in a struct |
2262 | * efx_nic (including all sub-structures). | 2262 | * efx_nic (including all sub-structures). |
2263 | */ | 2263 | */ |
2264 | static int efx_init_struct(struct efx_nic *efx, struct efx_nic_type *type, | 2264 | static int efx_init_struct(struct efx_nic *efx, const struct efx_nic_type *type, |
2265 | struct pci_dev *pci_dev, struct net_device *net_dev) | 2265 | struct pci_dev *pci_dev, struct net_device *net_dev) |
2266 | { | 2266 | { |
2267 | int i; | 2267 | int i; |
@@ -2451,7 +2451,7 @@ static int efx_pci_probe_main(struct efx_nic *efx) | |||
2451 | static int __devinit efx_pci_probe(struct pci_dev *pci_dev, | 2451 | static int __devinit efx_pci_probe(struct pci_dev *pci_dev, |
2452 | const struct pci_device_id *entry) | 2452 | const struct pci_device_id *entry) |
2453 | { | 2453 | { |
2454 | struct efx_nic_type *type = (struct efx_nic_type *) entry->driver_data; | 2454 | const struct efx_nic_type *type = (const struct efx_nic_type *) entry->driver_data; |
2455 | struct net_device *net_dev; | 2455 | struct net_device *net_dev; |
2456 | struct efx_nic *efx; | 2456 | struct efx_nic *efx; |
2457 | int i, rc; | 2457 | int i, rc; |