lkml.org 
[lkml]   [2010]   [Sep]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 4/8] drivers/gpu/drm/i915: use ARRAY_SIZE macro in intel_tv.c
Date
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@gmail.com>
---
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


\
 
 \ /
  Last update: 2010-09-08 23:19    [W:0.143 / U:0.216 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site