drivers/media: use NULL instead of 0 for ptrs
PATCH 1/1 drivers/media: use NULL instead of 0 for ptrs
From: Randy Dunlap <[email protected]>
Use NULL instead of 0 for pointer value, eliminate sparse warnings.
Signed-off-by Randy Dunlap <[email protected]>
--- drivers/media/dvb/dvb-usb/gp8psk.c | 2 +- drivers/media/video/cx88/cx88-blackbird.c | 2 +- drivers/media/video/pvrusb2/pvrusb2-i2c-chips-v4l2.c | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-)
drivers/media/dvb/dvb-usb/gp8psk.c +1 -1
@@ -217,7 +217,7 @@ static struct dvb_usb_properties gp8psk_ .cold_ids = { &gp8psk_usb_table[0], NULL }, .warm_ids = { &gp8psk_usb_table[1], NULL }, }, - { 0 }, + { NULL }, } };
drivers/media/video/cx88/cx88-blackbird.c +1 -1
@@ -896,7 +896,7 @@ static int mpeg_do_ioctl(struct inode *isnprintf (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);
drivers/media/video/pvrusb2/pvrusb2-i2c-chips-v4l2.c +3 -1
@@ -19,6 +19,7 @@* */ +#include <linux/kernel.h> #include "pvrusb2-i2c-core.h" #include "pvrusb2-hdw-internal.h" #include "pvrusb2-debug.h"
@@ -93,7 +94,8 @@ void pvr2_i2c_probe(struct pvr2_hdw *hdwconst 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]; }
---