aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ixgb
diff options
context:
space:
mode:
authorJeff Kirsher <jeffrey.t.kirsher@intel.com>2010-12-01 14:59:50 -0500
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2010-12-11 01:12:32 -0500
commit667445008db3f45a760c235d771be0c9671e59e5 (patch)
tree6b6fea62bfcfeb78a6deeb851b70c8eda0700c17 /drivers/net/ixgb
parent19a0b67afd174c4db261d587b5c67704dcd53c17 (diff)
Intel Wired LAN drivers: Use static const
Based on work by Joe Perches <joe@perches.com> Using static const to decrease data and overall object size. CC: Joe Perches <joe@perches.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Tested-by: Emil Tantilov <emil.s.tantilov@intel.com>
Diffstat (limited to 'drivers/net/ixgb')
-rw-r--r--drivers/net/ixgb/ixgb_param.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/drivers/net/ixgb/ixgb_param.c b/drivers/net/ixgb/ixgb_param.c
index 88a08f056241..dd7fbeb1f7d1 100644
--- a/drivers/net/ixgb/ixgb_param.c
+++ b/drivers/net/ixgb/ixgb_param.c
@@ -191,9 +191,9 @@ struct ixgb_option {
191 } r; 191 } r;
192 struct { /* list_option info */ 192 struct { /* list_option info */
193 int nr; 193 int nr;
194 struct ixgb_opt_list { 194 const struct ixgb_opt_list {
195 int i; 195 int i;
196 char *str; 196 const char *str;
197 } *p; 197 } *p;
198 } l; 198 } l;
199 } arg; 199 } arg;
@@ -226,7 +226,7 @@ ixgb_validate_option(unsigned int *value, const struct ixgb_option *opt)
226 break; 226 break;
227 case list_option: { 227 case list_option: {
228 int i; 228 int i;
229 struct ixgb_opt_list *ent; 229 const struct ixgb_opt_list *ent;
230 230
231 for (i = 0; i < opt->arg.l.nr; i++) { 231 for (i = 0; i < opt->arg.l.nr; i++) {
232 ent = &opt->arg.l.p[i]; 232 ent = &opt->arg.l.p[i];
@@ -322,14 +322,15 @@ ixgb_check_options(struct ixgb_adapter *adapter)
322 } 322 }
323 { /* Flow Control */ 323 { /* Flow Control */
324 324
325 struct ixgb_opt_list fc_list[] = 325 static const struct ixgb_opt_list fc_list[] = {
326 {{ ixgb_fc_none, "Flow Control Disabled" }, 326 { ixgb_fc_none, "Flow Control Disabled" },
327 { ixgb_fc_rx_pause,"Flow Control Receive Only" }, 327 { ixgb_fc_rx_pause, "Flow Control Receive Only" },
328 { ixgb_fc_tx_pause,"Flow Control Transmit Only" }, 328 { ixgb_fc_tx_pause, "Flow Control Transmit Only" },
329 { ixgb_fc_full, "Flow Control Enabled" }, 329 { ixgb_fc_full, "Flow Control Enabled" },
330 { ixgb_fc_default, "Flow Control Hardware Default" }}; 330 { ixgb_fc_default, "Flow Control Hardware Default" }
331 };
331 332
332 const struct ixgb_option opt = { 333 static const struct ixgb_option opt = {
333 .type = list_option, 334 .type = list_option,
334 .name = "Flow Control", 335 .name = "Flow Control",
335 .err = "reading default settings from EEPROM", 336 .err = "reading default settings from EEPROM",