V4L/DVB (4674): Use NULL instead of 0 for ptrs
authorRandy Dunlap <rdunlap@xenotime.net>
Thu, 28 Sep 2006 17:03:26 +0000 (14:03 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Tue, 3 Oct 2006 18:14:20 +0000 (15:14 -0300)
Use NULL instead of 0 for pointer value, eliminate sparse warnings.

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
drivers/media/dvb/dvb-usb/gp8psk.c
drivers/media/video/cx88/cx88-blackbird.c
drivers/media/video/pvrusb2/pvrusb2-i2c-chips-v4l2.c

index 334269bd065d8254c11562249c706811cffb83bd..7375eb20166dfecb39497d5d91abf3f138c17eeb 100644 (file)
@@ -219,7 +219,7 @@ static struct dvb_usb_device_properties gp8psk_properties = {
                  .cold_ids = { &gp8psk_usb_table[0], NULL },
                  .warm_ids = { &gp8psk_usb_table[1], NULL },
                },
-               { 0 },
+               { NULL },
        }
 };
 
index 663b7137972c55d031a4ee09232461eaadfe55c3..46738321adafe22367e319c205adf24054fee166 100644 (file)
@@ -896,7 +896,7 @@ static int mpeg_do_ioctl(struct inode *inode, struct file *file,
                snprintf(name, sizeof(name), "%s/2", core->name);
                printk("%s/2: ============  START LOG STATUS  ============\n",
                       core->name);
-               cx88_call_i2c_clients(core, VIDIOC_LOG_STATUS, 0);
+               cx88_call_i2c_clients(core, VIDIOC_LOG_STATUS, NULL);
                cx2341x_log_status(&dev->params, name);
                printk("%s/2: =============  END LOG STATUS  =============\n",
                       core->name);
index ed3e8105292a23b807c5267e1216ab851d524821..05121666b9ba5c6a516dcf76023c7a4602ac8401 100644 (file)
@@ -19,6 +19,7 @@
  *
  */
 
+#include <linux/kernel.h>
 #include "pvrusb2-i2c-core.h"
 #include "pvrusb2-hdw-internal.h"
 #include "pvrusb2-debug.h"
@@ -89,7 +90,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];
 }