summaryrefslogtreecommitdiffstats
path: root/drivers/net/sfc/phy.h
diff options
context:
space:
mode:
authorstephen hemminger2011-04-14 07:50:12 +0200
committerDavid S. Miller2011-04-15 06:53:42 +0200
commit6c8c2513c86c589a819c161c9abbdea2a3d56f5e (patch)
tree043371fbd07fce16159abf9d58cfd0df35b99268 /drivers/net/sfc/phy.h
parentPhonet: convert bound sockets hash list to RCU (diff)
downloadkernel-qcow2-linux-6c8c2513c86c589a819c161c9abbdea2a3d56f5e.tar.gz
kernel-qcow2-linux-6c8c2513c86c589a819c161c9abbdea2a3d56f5e.tar.xz
kernel-qcow2-linux-6c8c2513c86c589a819c161c9abbdea2a3d56f5e.zip
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/phy.h')
-rw-r--r--drivers/net/sfc/phy.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/sfc/phy.h b/drivers/net/sfc/phy.h
index b3b79472421e..11d148cd8441 100644
--- a/drivers/net/sfc/phy.h
+++ b/drivers/net/sfc/phy.h
@@ -13,14 +13,14 @@
/****************************************************************************
* 10Xpress (SFX7101) PHY
*/
-extern struct efx_phy_operations falcon_sfx7101_phy_ops;
+extern const struct efx_phy_operations falcon_sfx7101_phy_ops;
extern void tenxpress_set_id_led(struct efx_nic *efx, enum efx_led_mode mode);
/****************************************************************************
* AMCC/Quake QT202x PHYs
*/
-extern struct efx_phy_operations falcon_qt202x_phy_ops;
+extern const struct efx_phy_operations falcon_qt202x_phy_ops;
/* These PHYs provide various H/W control states for LEDs */
#define QUAKE_LED_LINK_INVAL (0)
@@ -39,7 +39,7 @@ extern void falcon_qt202x_set_led(struct efx_nic *p, int led, int state);
/****************************************************************************
* Transwitch CX4 retimer
*/
-extern struct efx_phy_operations falcon_txc_phy_ops;
+extern const struct efx_phy_operations falcon_txc_phy_ops;
#define TXC_GPIO_DIR_INPUT 0
#define TXC_GPIO_DIR_OUTPUT 1
@@ -50,7 +50,7 @@ extern void falcon_txc_set_gpio_val(struct efx_nic *efx, int pin, int val);
/****************************************************************************
* Siena managed PHYs
*/
-extern struct efx_phy_operations efx_mcdi_phy_ops;
+extern const struct efx_phy_operations efx_mcdi_phy_ops;
extern int efx_mcdi_mdio_read(struct efx_nic *efx, unsigned int bus,
unsigned int prtad, unsigned int devad,