diff options
| author | Joe Perches <joe@perches.com> | 2010-12-21 05:16:10 -0500 |
|---|---|---|
| committer | Joe Perches <joe@perches.com> | 2010-12-21 05:16:10 -0500 |
| commit | 215faf9c5f6e319e97edea9e178123e07825c14d (patch) | |
| tree | 32fb283f64110ad634a37dc2e133cb91a97988c5 /drivers/net/tulip | |
| parent | 75a84eb5d144dc761e1bb0f7dcacbf2b5cee562c (diff) | |
drivers/net/*/: Use static const
Using static const generally increases object text and decreases data size.
It also generally decreases overall object size.
Signed-off-by: Joe Perches <joe@perches.com>
Diffstat (limited to 'drivers/net/tulip')
| -rw-r--r-- | drivers/net/tulip/de2104x.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/drivers/net/tulip/de2104x.c b/drivers/net/tulip/de2104x.c index c78a50586c1d..b13c6b040be3 100644 --- a/drivers/net/tulip/de2104x.c +++ b/drivers/net/tulip/de2104x.c | |||
| @@ -964,7 +964,7 @@ static void de_set_media (struct de_private *de) | |||
| 964 | dw32(MacMode, macmode); | 964 | dw32(MacMode, macmode); |
| 965 | } | 965 | } |
| 966 | 966 | ||
| 967 | static void de_next_media (struct de_private *de, u32 *media, | 967 | static void de_next_media (struct de_private *de, const u32 *media, |
| 968 | unsigned int n_media) | 968 | unsigned int n_media) |
| 969 | { | 969 | { |
| 970 | unsigned int i; | 970 | unsigned int i; |
| @@ -1008,10 +1008,10 @@ static void de21040_media_timer (unsigned long data) | |||
| 1008 | return; | 1008 | return; |
| 1009 | 1009 | ||
| 1010 | if (de->media_type == DE_MEDIA_AUI) { | 1010 | if (de->media_type == DE_MEDIA_AUI) { |
| 1011 | u32 next_state = DE_MEDIA_TP; | 1011 | static const u32 next_state = DE_MEDIA_TP; |
| 1012 | de_next_media(de, &next_state, 1); | 1012 | de_next_media(de, &next_state, 1); |
| 1013 | } else { | 1013 | } else { |
| 1014 | u32 next_state = DE_MEDIA_AUI; | 1014 | static const u32 next_state = DE_MEDIA_AUI; |
| 1015 | de_next_media(de, &next_state, 1); | 1015 | de_next_media(de, &next_state, 1); |
| 1016 | } | 1016 | } |
| 1017 | 1017 | ||
| @@ -1136,13 +1136,19 @@ static void de21041_media_timer (unsigned long data) | |||
| 1136 | * simply resets the PHY and reloads the current media settings. | 1136 | * simply resets the PHY and reloads the current media settings. |
| 1137 | */ | 1137 | */ |
| 1138 | if (de->media_type == DE_MEDIA_AUI) { | 1138 | if (de->media_type == DE_MEDIA_AUI) { |
| 1139 | u32 next_states[] = { DE_MEDIA_BNC, DE_MEDIA_TP_AUTO }; | 1139 | static const u32 next_states[] = { |
| 1140 | DE_MEDIA_BNC, DE_MEDIA_TP_AUTO | ||
| 1141 | }; | ||
| 1140 | de_next_media(de, next_states, ARRAY_SIZE(next_states)); | 1142 | de_next_media(de, next_states, ARRAY_SIZE(next_states)); |
| 1141 | } else if (de->media_type == DE_MEDIA_BNC) { | 1143 | } else if (de->media_type == DE_MEDIA_BNC) { |
| 1142 | u32 next_states[] = { DE_MEDIA_TP_AUTO, DE_MEDIA_AUI }; | 1144 | static const u32 next_states[] = { |
| 1145 | DE_MEDIA_TP_AUTO, DE_MEDIA_AUI | ||
| 1146 | }; | ||
| 1143 | de_next_media(de, next_states, ARRAY_SIZE(next_states)); | 1147 | de_next_media(de, next_states, ARRAY_SIZE(next_states)); |
| 1144 | } else { | 1148 | } else { |
| 1145 | u32 next_states[] = { DE_MEDIA_AUI, DE_MEDIA_BNC, DE_MEDIA_TP_AUTO }; | 1149 | static const u32 next_states[] = { |
| 1150 | DE_MEDIA_AUI, DE_MEDIA_BNC, DE_MEDIA_TP_AUTO | ||
| 1151 | }; | ||
| 1146 | de_next_media(de, next_states, ARRAY_SIZE(next_states)); | 1152 | de_next_media(de, next_states, ARRAY_SIZE(next_states)); |
| 1147 | } | 1153 | } |
| 1148 | 1154 | ||
