Skip to content

Commit 7282d49

Browse files
author
Jeff Garzik
committed
drivers/net: const-ify ethtool_ops declarations
Signed-off-by: Jeff Garzik <jeff@garzik.org>
1 parent 76fd859 commit 7282d49

106 files changed

Lines changed: 163 additions & 178 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎drivers/net/3c501.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -881,7 +881,7 @@ static void netdev_set_msglevel(struct net_device *dev, u32 level)
881881
debug = level;
882882
}
883883

884-
static struct ethtool_ops netdev_ethtool_ops = {
884+
static const struct ethtool_ops netdev_ethtool_ops = {
885885
.get_drvinfo = netdev_get_drvinfo,
886886
.get_msglevel = netdev_get_msglevel,
887887
.set_msglevel = netdev_set_msglevel,

‎drivers/net/3c501.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ static void el_reset(struct net_device *dev);
1313
static int el1_close(struct net_device *dev);
1414
static struct net_device_stats *el1_get_stats(struct net_device *dev);
1515
static void set_multicast_list(struct net_device *dev);
16-
static struct ethtool_ops netdev_ethtool_ops;
16+
static const struct ethtool_ops netdev_ethtool_ops;
1717

1818
#define EL1_IO_EXTENT 16
1919

‎drivers/net/3c503.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ static void el2_block_input(struct net_device *dev, int count, struct sk_buff *s
7979
int ring_offset);
8080
static void el2_get_8390_hdr(struct net_device *dev, struct e8390_pkt_hdr *hdr,
8181
int ring_page);
82-
static struct ethtool_ops netdev_ethtool_ops;
82+
static const struct ethtool_ops netdev_ethtool_ops;
8383

8484

8585
/* This routine probes for a memory-mapped 3c503 board by looking for
@@ -666,7 +666,7 @@ static void netdev_get_drvinfo(struct net_device *dev,
666666
sprintf(info->bus_info, "ISA 0x%lx", dev->base_addr);
667667
}
668668

669-
static struct ethtool_ops netdev_ethtool_ops = {
669+
static const struct ethtool_ops netdev_ethtool_ops = {
670670
.get_drvinfo = netdev_get_drvinfo,
671671
};
672672

‎drivers/net/3c505.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1169,7 +1169,7 @@ static void netdev_set_msglevel(struct net_device *dev, u32 level)
11691169
debug = level;
11701170
}
11711171

1172-
static struct ethtool_ops netdev_ethtool_ops = {
1172+
static const struct ethtool_ops netdev_ethtool_ops = {
11731173
.get_drvinfo = netdev_get_drvinfo,
11741174
.get_msglevel = netdev_get_msglevel,
11751175
.set_msglevel = netdev_set_msglevel,

‎drivers/net/3c507.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ static void el16_tx_timeout (struct net_device *dev);
294294

295295
static void hardware_send_packet(struct net_device *dev, void *buf, short length, short pad);
296296
static void init_82586_mem(struct net_device *dev);
297-
static struct ethtool_ops netdev_ethtool_ops;
297+
static const struct ethtool_ops netdev_ethtool_ops;
298298
static void init_rx_bufs(struct net_device *);
299299

300300
static int io = 0x300;
@@ -919,7 +919,7 @@ static void netdev_set_msglevel(struct net_device *dev, u32 level)
919919
debug = level;
920920
}
921921

922-
static struct ethtool_ops netdev_ethtool_ops = {
922+
static const struct ethtool_ops netdev_ethtool_ops = {
923923
.get_drvinfo = netdev_get_drvinfo,
924924
.get_msglevel = netdev_get_msglevel,
925925
.set_msglevel = netdev_set_msglevel,

‎drivers/net/3c509.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ static void set_multicast_list(struct net_device *dev);
200200
static void el3_tx_timeout (struct net_device *dev);
201201
static void el3_down(struct net_device *dev);
202202
static void el3_up(struct net_device *dev);
203-
static struct ethtool_ops ethtool_ops;
203+
static const struct ethtool_ops ethtool_ops;
204204
#ifdef EL3_SUSPEND
205205
static int el3_suspend(struct device *, pm_message_t);
206206
static int el3_resume(struct device *);
@@ -1349,7 +1349,7 @@ static void el3_set_msglevel(struct net_device *dev, u32 v)
13491349
el3_debug = v;
13501350
}
13511351

1352-
static struct ethtool_ops ethtool_ops = {
1352+
static const struct ethtool_ops ethtool_ops = {
13531353
.get_drvinfo = el3_get_drvinfo,
13541354
.get_settings = el3_get_settings,
13551355
.set_settings = el3_set_settings,

‎drivers/net/3c515.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ static int corkscrew_close(struct net_device *dev);
379379
static void update_stats(int addr, struct net_device *dev);
380380
static struct net_device_stats *corkscrew_get_stats(struct net_device *dev);
381381
static void set_rx_mode(struct net_device *dev);
382-
static struct ethtool_ops netdev_ethtool_ops;
382+
static const struct ethtool_ops netdev_ethtool_ops;
383383

384384

385385
/*
@@ -1561,7 +1561,7 @@ static void netdev_set_msglevel(struct net_device *dev, u32 level)
15611561
corkscrew_debug = level;
15621562
}
15631563

1564-
static struct ethtool_ops netdev_ethtool_ops = {
1564+
static const struct ethtool_ops netdev_ethtool_ops = {
15651565
.get_drvinfo = netdev_get_drvinfo,
15661566
.get_msglevel = netdev_get_msglevel,
15671567
.set_msglevel = netdev_set_msglevel,

‎drivers/net/3c523.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ static void elmc_timeout(struct net_device *dev);
189189
#ifdef ELMC_MULTICAST
190190
static void set_multicast_list(struct net_device *dev);
191191
#endif
192-
static struct ethtool_ops netdev_ethtool_ops;
192+
static const struct ethtool_ops netdev_ethtool_ops;
193193

194194
/* helper-functions */
195195
static int init586(struct net_device *dev);
@@ -1259,7 +1259,7 @@ static void netdev_get_drvinfo(struct net_device *dev,
12591259
sprintf(info->bus_info, "MCA 0x%lx", dev->base_addr);
12601260
}
12611261

1262-
static struct ethtool_ops netdev_ethtool_ops = {
1262+
static const struct ethtool_ops netdev_ethtool_ops = {
12631263
.get_drvinfo = netdev_get_drvinfo,
12641264
};
12651265

‎drivers/net/3c527.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ static int mc32_close(struct net_device *dev);
222222
static struct net_device_stats *mc32_get_stats(struct net_device *dev);
223223
static void mc32_set_multicast_list(struct net_device *dev);
224224
static void mc32_reset_multicast_list(struct net_device *dev);
225-
static struct ethtool_ops netdev_ethtool_ops;
225+
static const struct ethtool_ops netdev_ethtool_ops;
226226

227227
static void cleanup_card(struct net_device *dev)
228228
{
@@ -1627,7 +1627,7 @@ static void netdev_set_msglevel(struct net_device *dev, u32 level)
16271627
mc32_debug = level;
16281628
}
16291629

1630-
static struct ethtool_ops netdev_ethtool_ops = {
1630+
static const struct ethtool_ops netdev_ethtool_ops = {
16311631
.get_drvinfo = netdev_get_drvinfo,
16321632
.get_msglevel = netdev_get_msglevel,
16331633
.set_msglevel = netdev_set_msglevel,

‎drivers/net/3c59x.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -729,7 +729,7 @@ static int vortex_ioctl(struct net_device *dev, struct ifreq *rq, int cmd);
729729
#endif
730730
static void vortex_tx_timeout(struct net_device *dev);
731731
static void acpi_set_WOL(struct net_device *dev);
732-
static struct ethtool_ops vortex_ethtool_ops;
732+
static const struct ethtool_ops vortex_ethtool_ops;
733733
static void set_8021q_mode(struct net_device *dev, int enable);
734734

735735
/* This driver uses 'options' to pass the media type, full-duplex flag, etc. */
@@ -2873,7 +2873,7 @@ static void vortex_get_drvinfo(struct net_device *dev,
28732873
}
28742874
}
28752875

2876-
static struct ethtool_ops vortex_ethtool_ops = {
2876+
static const struct ethtool_ops vortex_ethtool_ops = {
28772877
.get_drvinfo = vortex_get_drvinfo,
28782878
.get_strings = vortex_get_strings,
28792879
.get_msglevel = vortex_get_msglevel,

0 commit comments

Comments
 (0)