drm/i915/tv: fix open-coded ARRAY_SIZE.
authorDave Airlie <airlied@redhat.com>
Fri, 20 Apr 2012 12:13:54 +0000 (13:13 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Fri, 20 Apr 2012 13:55:54 +0000 (15:55 +0200)
Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_tv.c

index ca12c709f3eb450787aa58fe63ee4efb7e32a96c..67f444d632fbd565baeb32cac79426dbf8f51fd8 100644 (file)
@@ -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))