From: Maxime Ripard Date: Fri, 6 Sep 2019 07:46:14 +0000 (+0300) Subject: drm/modes: Make the whitelist more const X-Git-Tag: v5.3~7^2^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a3200debde5fda3e25f7e22cb2bc17a9280f7811;p=thirdparty%2Flinux.git drm/modes: Make the whitelist more const The commit 3764137906a5 ("drm/modes: Introduce a whitelist for the named modes") introduced a whitelist in the named modes lookup code in order to be a bit more robust. However, even though the char pointers were made const, the array itself was not. Let's fix that. Fixes: 3764137906a5 ("drm/modes: Introduce a whitelist for the named modes") Suggested-by: Jani Nikula Reviewed-by: Jani Nikula Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20190906074614.30608-1-mripard@kernel.org --- diff --git a/drivers/gpu/drm/drm_modes.c b/drivers/gpu/drm/drm_modes.c index 0d23bf729e9fa..c814bcef18a40 100644 --- a/drivers/gpu/drm/drm_modes.c +++ b/drivers/gpu/drm/drm_modes.c @@ -1677,7 +1677,7 @@ static int drm_mode_parse_cmdline_options(char *str, size_t len, return 0; } -static const char *drm_named_modes_whitelist[] = { +static const char * const drm_named_modes_whitelist[] = { "NTSC", "PAL", };