[PATCH 4/8] drivers/gpu/drm/i915: use ARRAY_SIZE macro in intel_tv.c

From: Nikitas Angelinas
Date: Wed Sep 08 2010 - 17:17:31 EST


Replace sizeof(tv_modes) / sizeof (tv_modes[0]) with
ARRAY_SIZE(tv_modes) in drivers/gpu/drm/i915/intel_tv.c

Signed-off-by: Nikitas Angelinas <nikitasangelinas@xxxxxxxxx>
---
drivers/gpu/drm/i915/intel_tv.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_tv.c b/drivers/gpu/drm/i915/intel_tv.c
index d2029ef..6dc19f6 100644
--- a/drivers/gpu/drm/i915/intel_tv.c
+++ b/drivers/gpu/drm/i915/intel_tv.c
@@ -30,6 +30,7 @@
* Integrated TV-out support for the 915GM and 945GM.
*/

+#include <linux/kernel.h>
#include "drmP.h"
#include "drm.h"
#include "drm_crtc.h"
@@ -926,7 +927,7 @@ intel_tv_mode_lookup (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))
--
1.7.2.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/