From b14a545b35a3d6187c96e18c07568b3f42a0ee1c Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Thu, 28 Sep 2006 14:03:26 -0300 Subject: use NULL instead of 0 for ptrs From: Randy Dunlap Use NULL instead of 0 for pointer value, eliminate sparse warnings. Signed-off-by: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: Mauro Carvalho Chehab --- linux/drivers/media/video/pvrusb2/pvrusb2-i2c-chips-v4l2.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'linux/drivers/media/video/pvrusb2/pvrusb2-i2c-chips-v4l2.c') 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 #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]; } -- cgit v1.2.3