kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drivers/media/video/hexium_gemini.c: ARRAY_SIZE()
@ 2007-07-27 12:46 Andi Drebes
  0 siblings, 0 replies; only message in thread
From: Andi Drebes @ 2007-07-27 12:46 UTC (permalink / raw)
  To: kernel-janitors

This patch replaces an array size calculation done using sizeof
with an invocation of the ARRAY_SIZE macro.

Please CC me for any comments.

Tested by compilation on an i386 box using "allyesconfig".
Diffed against Linus' git-tree.

Signed-off-by: Andi Drebes <lists-receive@programmierforen.de>
---
diff --git a/drivers/media/video/hexium_gemini.c b/drivers/media/video/hexium_gemini.c
index c7fed34..fa37097 100644
--- a/drivers/media/video/hexium_gemini.c
+++ b/drivers/media/video/hexium_gemini.c
@@ -512,7 +512,7 @@ static struct saa7146_ext_vv vv_data = {
 	.inputs = HEXIUM_INPUTS,
 	.capabilities = 0,
 	.stds = &hexium_standards[0],
-	.num_stds = sizeof(hexium_standards) / sizeof(struct saa7146_standard),
+	.num_stds = ARRAY_SIZE(hexium_standards),
 	.std_callback = &std_callback,
 	.ioctls = &ioctls[0],
 	.ioctl = hexium_ioctl,

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2007-07-27 12:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-27 12:46 [PATCH] drivers/media/video/hexium_gemini.c: ARRAY_SIZE() Andi Drebes

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).