aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorstephen hemminger <shemminger@vyatta.com>2010-10-13 10:51:25 -0400
committerDavid S. Miller <davem@davemloft.net>2010-10-16 14:13:25 -0400
commitcadb7924b10b2a3117dafe14d6d6d28035ec4ddb (patch)
treed0f233d5868f2cde80bf60c13b390182f98894ea
parent8ee17ae68c0f1e281a432a4318fa2511e25c9492 (diff)
stmmac: make function tables const
These tables only contain function pointers. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Acked-by: Gustavo F. Padovan <padovan@profusion.mobi> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/stmmac/common.h6
-rw-r--r--drivers/net/stmmac/dwmac100.h2
-rw-r--r--drivers/net/stmmac/dwmac1000.h2
-rw-r--r--drivers/net/stmmac/dwmac1000_core.c2
-rw-r--r--drivers/net/stmmac/dwmac1000_dma.c2
-rw-r--r--drivers/net/stmmac/dwmac100_core.c2
-rw-r--r--drivers/net/stmmac/dwmac100_dma.c2
-rw-r--r--drivers/net/stmmac/enh_desc.c2
-rw-r--r--drivers/net/stmmac/norm_desc.c2
-rw-r--r--drivers/net/stmmac/stmmac.h4
10 files changed, 13 insertions, 13 deletions
diff --git a/drivers/net/stmmac/common.h b/drivers/net/stmmac/common.h
index dec7ce40c27a..375ea193e139 100644
--- a/drivers/net/stmmac/common.h
+++ b/drivers/net/stmmac/common.h
@@ -235,9 +235,9 @@ struct mii_regs {
235}; 235};
236 236
237struct mac_device_info { 237struct mac_device_info {
238 struct stmmac_ops *mac; 238 const struct stmmac_ops *mac;
239 struct stmmac_desc_ops *desc; 239 const struct stmmac_desc_ops *desc;
240 struct stmmac_dma_ops *dma; 240 const struct stmmac_dma_ops *dma;
241 struct mii_regs mii; /* MII register Addresses */ 241 struct mii_regs mii; /* MII register Addresses */
242 struct mac_link link; 242 struct mac_link link;
243}; 243};
diff --git a/drivers/net/stmmac/dwmac100.h b/drivers/net/stmmac/dwmac100.h
index 97956cbf1cb4..7c6d857a9cc7 100644
--- a/drivers/net/stmmac/dwmac100.h
+++ b/drivers/net/stmmac/dwmac100.h
@@ -118,4 +118,4 @@ enum ttc_control {
118#define DMA_MISSED_FRAME_OVE_M 0x00010000 /* Missed Frame Overflow */ 118#define DMA_MISSED_FRAME_OVE_M 0x00010000 /* Missed Frame Overflow */
119#define DMA_MISSED_FRAME_M_CNTR 0x0000ffff /* Missed Frame Couinter */ 119#define DMA_MISSED_FRAME_M_CNTR 0x0000ffff /* Missed Frame Couinter */
120 120
121extern struct stmmac_dma_ops dwmac100_dma_ops; 121extern const struct stmmac_dma_ops dwmac100_dma_ops;
diff --git a/drivers/net/stmmac/dwmac1000.h b/drivers/net/stmmac/dwmac1000.h
index 81ee4fd04386..cfcef0ea0fa5 100644
--- a/drivers/net/stmmac/dwmac1000.h
+++ b/drivers/net/stmmac/dwmac1000.h
@@ -205,4 +205,4 @@ enum rtc_control {
205#define GMAC_MMC_TX_INTR 0x108 205#define GMAC_MMC_TX_INTR 0x108
206#define GMAC_MMC_RX_CSUM_OFFLOAD 0x208 206#define GMAC_MMC_RX_CSUM_OFFLOAD 0x208
207 207
208extern struct stmmac_dma_ops dwmac1000_dma_ops; 208extern const struct stmmac_dma_ops dwmac1000_dma_ops;
diff --git a/drivers/net/stmmac/dwmac1000_core.c b/drivers/net/stmmac/dwmac1000_core.c
index 65667b692024..6ae4c3f4c63c 100644
--- a/drivers/net/stmmac/dwmac1000_core.c
+++ b/drivers/net/stmmac/dwmac1000_core.c
@@ -212,7 +212,7 @@ static void dwmac1000_irq_status(void __iomem *ioaddr)
212 } 212 }
213} 213}
214 214
215struct stmmac_ops dwmac1000_ops = { 215static const struct stmmac_ops dwmac1000_ops = {
216 .core_init = dwmac1000_core_init, 216 .core_init = dwmac1000_core_init,
217 .rx_coe = dwmac1000_rx_coe_supported, 217 .rx_coe = dwmac1000_rx_coe_supported,
218 .dump_regs = dwmac1000_dump_regs, 218 .dump_regs = dwmac1000_dump_regs,
diff --git a/drivers/net/stmmac/dwmac1000_dma.c b/drivers/net/stmmac/dwmac1000_dma.c
index ce6163e39cd5..2c47712d45d0 100644
--- a/drivers/net/stmmac/dwmac1000_dma.c
+++ b/drivers/net/stmmac/dwmac1000_dma.c
@@ -138,7 +138,7 @@ static void dwmac1000_dump_dma_regs(void __iomem *ioaddr)
138 } 138 }
139} 139}
140 140
141struct stmmac_dma_ops dwmac1000_dma_ops = { 141const struct stmmac_dma_ops dwmac1000_dma_ops = {
142 .init = dwmac1000_dma_init, 142 .init = dwmac1000_dma_init,
143 .dump_regs = dwmac1000_dump_dma_regs, 143 .dump_regs = dwmac1000_dump_dma_regs,
144 .dma_mode = dwmac1000_dma_operation_mode, 144 .dma_mode = dwmac1000_dma_operation_mode,
diff --git a/drivers/net/stmmac/dwmac100_core.c b/drivers/net/stmmac/dwmac100_core.c
index 94eeccf3a8a0..c724fc36a24f 100644
--- a/drivers/net/stmmac/dwmac100_core.c
+++ b/drivers/net/stmmac/dwmac100_core.c
@@ -168,7 +168,7 @@ static void dwmac100_pmt(void __iomem *ioaddr, unsigned long mode)
168 return; 168 return;
169} 169}
170 170
171struct stmmac_ops dwmac100_ops = { 171static const struct stmmac_ops dwmac100_ops = {
172 .core_init = dwmac100_core_init, 172 .core_init = dwmac100_core_init,
173 .rx_coe = dwmac100_rx_coe_supported, 173 .rx_coe = dwmac100_rx_coe_supported,
174 .dump_regs = dwmac100_dump_mac_regs, 174 .dump_regs = dwmac100_dump_mac_regs,
diff --git a/drivers/net/stmmac/dwmac100_dma.c b/drivers/net/stmmac/dwmac100_dma.c
index 96aac93b789b..e3e224b7d9e2 100644
--- a/drivers/net/stmmac/dwmac100_dma.c
+++ b/drivers/net/stmmac/dwmac100_dma.c
@@ -126,7 +126,7 @@ static void dwmac100_dma_diagnostic_fr(void *data, struct stmmac_extra_stats *x,
126 } 126 }
127} 127}
128 128
129struct stmmac_dma_ops dwmac100_dma_ops = { 129const struct stmmac_dma_ops dwmac100_dma_ops = {
130 .init = dwmac100_dma_init, 130 .init = dwmac100_dma_init,
131 .dump_regs = dwmac100_dump_dma_regs, 131 .dump_regs = dwmac100_dump_dma_regs,
132 .dma_mode = dwmac100_dma_operation_mode, 132 .dma_mode = dwmac100_dma_operation_mode,
diff --git a/drivers/net/stmmac/enh_desc.c b/drivers/net/stmmac/enh_desc.c
index 5d1471d8f8f6..e5dfb6a30182 100644
--- a/drivers/net/stmmac/enh_desc.c
+++ b/drivers/net/stmmac/enh_desc.c
@@ -318,7 +318,7 @@ static int enh_desc_get_rx_frame_len(struct dma_desc *p)
318 return p->des01.erx.frame_length; 318 return p->des01.erx.frame_length;
319} 319}
320 320
321struct stmmac_desc_ops enh_desc_ops = { 321const struct stmmac_desc_ops enh_desc_ops = {
322 .tx_status = enh_desc_get_tx_status, 322 .tx_status = enh_desc_get_tx_status,
323 .rx_status = enh_desc_get_rx_status, 323 .rx_status = enh_desc_get_rx_status,
324 .get_tx_len = enh_desc_get_tx_len, 324 .get_tx_len = enh_desc_get_tx_len,
diff --git a/drivers/net/stmmac/norm_desc.c b/drivers/net/stmmac/norm_desc.c
index 0dce90cb8124..cd0cc76f7a1c 100644
--- a/drivers/net/stmmac/norm_desc.c
+++ b/drivers/net/stmmac/norm_desc.c
@@ -202,7 +202,7 @@ static int ndesc_get_rx_frame_len(struct dma_desc *p)
202 return p->des01.rx.frame_length; 202 return p->des01.rx.frame_length;
203} 203}
204 204
205struct stmmac_desc_ops ndesc_ops = { 205const struct stmmac_desc_ops ndesc_ops = {
206 .tx_status = ndesc_get_tx_status, 206 .tx_status = ndesc_get_tx_status,
207 .rx_status = ndesc_get_rx_status, 207 .rx_status = ndesc_get_rx_status,
208 .get_tx_len = ndesc_get_tx_len, 208 .get_tx_len = ndesc_get_tx_len,
diff --git a/drivers/net/stmmac/stmmac.h b/drivers/net/stmmac/stmmac.h
index 92154ff7d702..79bdc2e13224 100644
--- a/drivers/net/stmmac/stmmac.h
+++ b/drivers/net/stmmac/stmmac.h
@@ -121,5 +121,5 @@ static inline int stmmac_claim_resource(struct platform_device *pdev)
121extern int stmmac_mdio_unregister(struct net_device *ndev); 121extern int stmmac_mdio_unregister(struct net_device *ndev);
122extern int stmmac_mdio_register(struct net_device *ndev); 122extern int stmmac_mdio_register(struct net_device *ndev);
123extern void stmmac_set_ethtool_ops(struct net_device *netdev); 123extern void stmmac_set_ethtool_ops(struct net_device *netdev);
124extern struct stmmac_desc_ops enh_desc_ops; 124extern const struct stmmac_desc_ops enh_desc_ops;
125extern struct stmmac_desc_ops ndesc_ops; 125extern const struct stmmac_desc_ops ndesc_ops;