From: Dave Airlie Date: Fri, 20 Apr 2012 12:13:54 +0000 (+0100) Subject: drm/i915/tv: fix open-coded ARRAY_SIZE. X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3801a7fd8615365a58960561d3bd3479b485ed3e;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git drm/i915/tv: fix open-coded ARRAY_SIZE. Signed-off-by: Dave Airlie Reviewed-by: Chris Wilson Signed-off-by: Daniel Vetter --- diff --git a/drivers/gpu/drm/i915/intel_tv.c b/drivers/gpu/drm/i915/intel_tv.c index ca12c709f3eb..67f444d632fb 100644 --- a/drivers/gpu/drm/i915/intel_tv.c +++ b/drivers/gpu/drm/i915/intel_tv.c @@ -811,7 +811,7 @@ intel_tv_mode_lookup(const char *tv_format) { int i; - for (i = 0; i < sizeof(tv_modes) / sizeof(tv_modes[0]); i++) { + for (i = 0; i < ARRAY_SIZE(tv_modes); i++) { const struct tv_mode *tv_mode = &tv_modes[i]; if (!strcmp(tv_format, tv_mode->name))