summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/pvrusb2/pvrusb2-i2c-chips-v4l2.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2006-09-28 18:19:09 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2006-09-28 18:19:09 -0300
commit80f09f603d2001e9a765d66aa5fa5cf5f9f8ed44 (patch)
tree47ab08df25ce956b894779491385b3962b01fc77 /linux/drivers/media/video/pvrusb2/pvrusb2-i2c-chips-v4l2.c
parenteb7519ddf0079fb5e8a48fe4ec4091ded9de495a (diff)
parent5a8d592ca3b750889157d08b2e349e036a678663 (diff)
downloadmediapointer-dvb-s2-80f09f603d2001e9a765d66aa5fa5cf5f9f8ed44.tar.gz
mediapointer-dvb-s2-80f09f603d2001e9a765d66aa5fa5cf5f9f8ed44.tar.bz2
merge: http://www.linuxtv.org/hg/~stoth/hvr1300-final
From: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux/drivers/media/video/pvrusb2/pvrusb2-i2c-chips-v4l2.c')
-rw-r--r--linux/drivers/media/video/pvrusb2/pvrusb2-i2c-chips-v4l2.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-i2c-chips-v4l2.c b/linux/drivers/media/video/pvrusb2/pvrusb2-i2c-chips-v4l2.c
index 99daf3c1f..dbd2466ef 100644
--- a/linux/drivers/media/video/pvrusb2/pvrusb2-i2c-chips-v4l2.c
+++ b/linux/drivers/media/video/pvrusb2/pvrusb2-i2c-chips-v4l2.c
@@ -20,6 +20,7 @@
*/
#include "compat.h"
+#include <linux/kernel.h>
#include "pvrusb2-i2c-core.h"
#include "pvrusb2-hdw-internal.h"
#include "pvrusb2-debug.h"
@@ -90,7 +91,8 @@ void pvr2_i2c_probe(struct pvr2_hdw *hdw,struct pvr2_i2c_client *cp)
const struct pvr2_i2c_op *pvr2_i2c_get_op(unsigned int idx)
{
- if (idx >= sizeof(ops)/sizeof(ops[0])) return 0;
+ if (idx >= ARRAY_SIZE(ops))
+ return NULL;
return ops[idx];
}