Skip to contentSkip to conversation

drm: replace open-coded ARRAY_SIZE with macro

PATCH Applied Jim Cromie 1 participant 1 message Apr 11, 2012

Subsystems (2)
lore
Share & tools
lore

Jim Cromie

author
#0 lore raw

PATCH 1/11 drm: replace open-coded ARRAY_SIZE with macro

---
 drivers/gpu/drm/drm_edid_modes.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/drm_edid_modes.h +2 -2
index a91ffb1..c2534d4 100644
@@ -377,7 +377,7 @@ static const struct {
 	{ 1920, 1440, 60, 0 },
 	{ 1920, 1440, 75, 0 },
 };
-static const int num_est3_modes = sizeof(est3_modes) / sizeof(est3_modes[0]);
+static const int num_est3_modes = ARRAY_SIZE(est3_modes);
 
 /*
  * Probably taken from CEA-861 spec.
@@ -661,4 +661,4 @@ static const struct drm_display_mode edid_cea_modes[] = {
 		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) },
 };
 static const int drm_num_cea_modes =
-	sizeof (edid_cea_modes) / sizeof (edid_cea_modes[0]);
+	ARRAY_SIZE(edid_cea_modes);
Signature · 1 line
1.7.8.1