mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-19 18:24:14 +08:00
drm/edid: Use ARRAY_SIZE in drm_add_modes_noedid
Spotted while reading code for random reasons. Reviewed-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
This commit is contained in:
parent
2143287d4e
commit
fbb40b2857
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user