Commit b49aacc8 authored by Ville Syrjälä's avatar Ville Syrjälä

drm/i915: Use named initializers for the crc source name array

We assume that the index of the string in the crc source names
array matches the enum value for the crc source. Let's use named
initializers to make sure that is indeed the case even if someone
rearranges either the enum or the array.
Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190214192219.3858-2-ville.syrjala@linux.intel.comReviewed-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
parent 87c2b659
...@@ -31,15 +31,15 @@ ...@@ -31,15 +31,15 @@
#include "intel_drv.h" #include "intel_drv.h"
static const char * const pipe_crc_sources[] = { static const char * const pipe_crc_sources[] = {
"none", [INTEL_PIPE_CRC_SOURCE_NONE] = "none",
"plane1", [INTEL_PIPE_CRC_SOURCE_PLANE1] = "plane1",
"plane2", [INTEL_PIPE_CRC_SOURCE_PLANE2] = "plane2",
"pipe", [INTEL_PIPE_CRC_SOURCE_PIPE] = "pipe",
"TV", [INTEL_PIPE_CRC_SOURCE_TV] = "TV",
"DP-B", [INTEL_PIPE_CRC_SOURCE_DP_B] = "DP-B",
"DP-C", [INTEL_PIPE_CRC_SOURCE_DP_C] = "DP-C",
"DP-D", [INTEL_PIPE_CRC_SOURCE_DP_D] = "DP-D",
"auto", [INTEL_PIPE_CRC_SOURCE_AUTO] = "auto",
}; };
static int i8xx_pipe_crc_ctl_reg(enum intel_pipe_crc_source *source, static int i8xx_pipe_crc_ctl_reg(enum intel_pipe_crc_source *source,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment