drm/modes: Make the whitelist more const
authorMaxime Ripard <mripard@kernel.org>
Fri, 6 Sep 2019 07:46:14 +0000 (10:46 +0300)
committerMaxime Ripard <mripard@kernel.org>
Fri, 6 Sep 2019 15:55:33 +0000 (18:55 +0300)
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 <jani.nikula@linux.intel.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Maxime Ripard <mripard@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20190906074614.30608-1-mripard@kernel.org
drivers/gpu/drm/drm_modes.c

index 0d23bf729e9fa3a4997ff1b237c473cdacb94804..c814bcef18a4007d90d5dcb85fd8abb6c69a985b 100644 (file)
@@ -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",
 };