diff options
author | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2015-08-31 08:09:26 -0400 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2015-09-08 07:45:52 -0400 |
commit | b7c914b3d94e93bd9b442226231b0bba84c9fa2c (patch) | |
tree | f7be69acb9be36f385d04d239cbea745b67f6415 /drivers/gpu/drm/i2c | |
parent | a5b62374618f629f5d9d6d86f3bef9b552fc980b (diff) |
drm: Constify TV mode names
Make the mode names passed to drm_mode_create_tv_properties() const.
drivers/gpu/drm/i2c/ch7006.ko:
-.rodata 596
+.rodata 664
-.data 7064
+.data 6992
drivers/gpu/drm/nouveau/nouveau.ko:
-.rodata 146808
+.rodata 146904
-.data 178624
+.data 178528
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i2c')
-rw-r--r-- | drivers/gpu/drm/i2c/ch7006_drv.c | 6 | ||||
-rw-r--r-- | drivers/gpu/drm/i2c/ch7006_mode.c | 4 | ||||
-rw-r--r-- | drivers/gpu/drm/i2c/ch7006_priv.h | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/drivers/gpu/drm/i2c/ch7006_drv.c b/drivers/gpu/drm/i2c/ch7006_drv.c index 51fa32392029..d9a72c96e56c 100644 --- a/drivers/gpu/drm/i2c/ch7006_drv.c +++ b/drivers/gpu/drm/i2c/ch7006_drv.c | |||
@@ -119,8 +119,8 @@ static void ch7006_encoder_mode_set(struct drm_encoder *encoder, | |||
119 | struct ch7006_encoder_params *params = &priv->params; | 119 | struct ch7006_encoder_params *params = &priv->params; |
120 | struct ch7006_state *state = &priv->state; | 120 | struct ch7006_state *state = &priv->state; |
121 | uint8_t *regs = state->regs; | 121 | uint8_t *regs = state->regs; |
122 | struct ch7006_mode *mode = priv->mode; | 122 | const struct ch7006_mode *mode = priv->mode; |
123 | struct ch7006_tv_norm_info *norm = &ch7006_tv_norms[priv->norm]; | 123 | const struct ch7006_tv_norm_info *norm = &ch7006_tv_norms[priv->norm]; |
124 | int start_active; | 124 | int start_active; |
125 | 125 | ||
126 | ch7006_dbg(client, "\n"); | 126 | ch7006_dbg(client, "\n"); |
@@ -226,7 +226,7 @@ static int ch7006_encoder_get_modes(struct drm_encoder *encoder, | |||
226 | struct drm_connector *connector) | 226 | struct drm_connector *connector) |
227 | { | 227 | { |
228 | struct ch7006_priv *priv = to_ch7006_priv(encoder); | 228 | struct ch7006_priv *priv = to_ch7006_priv(encoder); |
229 | struct ch7006_mode *mode; | 229 | const struct ch7006_mode *mode; |
230 | int n = 0; | 230 | int n = 0; |
231 | 231 | ||
232 | for (mode = ch7006_modes; mode->mode.clock; mode++) { | 232 | for (mode = ch7006_modes; mode->mode.clock; mode++) { |
diff --git a/drivers/gpu/drm/i2c/ch7006_mode.c b/drivers/gpu/drm/i2c/ch7006_mode.c index 9b83574141a6..f4dca53f5752 100644 --- a/drivers/gpu/drm/i2c/ch7006_mode.c +++ b/drivers/gpu/drm/i2c/ch7006_mode.c | |||
@@ -26,7 +26,7 @@ | |||
26 | 26 | ||
27 | #include "ch7006_priv.h" | 27 | #include "ch7006_priv.h" |
28 | 28 | ||
29 | char *ch7006_tv_norm_names[] = { | 29 | const char * const ch7006_tv_norm_names[] = { |
30 | [TV_NORM_PAL] = "PAL", | 30 | [TV_NORM_PAL] = "PAL", |
31 | [TV_NORM_PAL_M] = "PAL-M", | 31 | [TV_NORM_PAL_M] = "PAL-M", |
32 | [TV_NORM_PAL_N] = "PAL-N", | 32 | [TV_NORM_PAL_N] = "PAL-N", |
@@ -202,7 +202,7 @@ void ch7006_setup_levels(struct drm_encoder *encoder) | |||
202 | struct i2c_client *client = drm_i2c_encoder_get_client(encoder); | 202 | struct i2c_client *client = drm_i2c_encoder_get_client(encoder); |
203 | struct ch7006_priv *priv = to_ch7006_priv(encoder); | 203 | struct ch7006_priv *priv = to_ch7006_priv(encoder); |
204 | uint8_t *regs = priv->state.regs; | 204 | uint8_t *regs = priv->state.regs; |
205 | struct ch7006_tv_norm_info *norm = &ch7006_tv_norms[priv->norm]; | 205 | const struct ch7006_tv_norm_info *norm = &ch7006_tv_norms[priv->norm]; |
206 | int gain; | 206 | int gain; |
207 | int black_level; | 207 | int black_level; |
208 | 208 | ||
diff --git a/drivers/gpu/drm/i2c/ch7006_priv.h b/drivers/gpu/drm/i2c/ch7006_priv.h index ce577841f931..cef6ce7c79d1 100644 --- a/drivers/gpu/drm/i2c/ch7006_priv.h +++ b/drivers/gpu/drm/i2c/ch7006_priv.h | |||
@@ -106,7 +106,7 @@ extern int ch7006_debug; | |||
106 | extern char *ch7006_tv_norm; | 106 | extern char *ch7006_tv_norm; |
107 | extern int ch7006_scale; | 107 | extern int ch7006_scale; |
108 | 108 | ||
109 | extern char *ch7006_tv_norm_names[]; | 109 | extern const char * const ch7006_tv_norm_names[]; |
110 | extern struct ch7006_tv_norm_info ch7006_tv_norms[]; | 110 | extern struct ch7006_tv_norm_info ch7006_tv_norms[]; |
111 | extern struct ch7006_mode ch7006_modes[]; | 111 | extern struct ch7006_mode ch7006_modes[]; |
112 | 112 | ||