From: Daniel Vetter Date: Mon, 10 Aug 2015 09:55:37 +0000 (+0200) Subject: drm/edid: Use ARRAY_SIZE in drm_add_modes_noedid X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=fbb40b285713cbb992466df8c838edb217e98fa6;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git drm/edid: Use ARRAY_SIZE in drm_add_modes_noedid Spotted while reading code for random reasons. Reviewed-by: Thierry Reding Signed-off-by: Daniel Vetter --- diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c index e6e05bb75a77..05bb7311ac5d 100644 --- a/drivers/gpu/drm/drm_edid.c +++ b/drivers/gpu/drm/drm_edid.c @@ -3802,7 +3802,7 @@ int drm_add_modes_noedid(struct drm_connector *connector, struct drm_display_mode *mode; struct drm_device *dev = connector->dev; - count = sizeof(drm_dmt_modes) / sizeof(struct drm_display_mode); + count = ARRAY_SIZE(drm_dmt_modes); if (hdisplay < 0) hdisplay = 0; if (vdisplay < 0)