diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-04-15 00:30:28 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-04-15 00:30:28 -0300 |
commit | 026810eff5e52b99a11e71acd0f56c13b4e41207 (patch) | |
tree | d650a9544fc5b4d788f00b77c5bf8e7e7a690634 /linux/drivers/media/video | |
parent | aad022d99cb9a72d6857c4bef808a52cdcb3e824 (diff) | |
download | mediapointer-dvb-s2-026810eff5e52b99a11e71acd0f56c13b4e41207.tar.gz mediapointer-dvb-s2-026810eff5e52b99a11e71acd0f56c13b4e41207.tar.bz2 |
Backport changeset 5fa1247a2b56f33f88432c24e109deaf91ef8281
From: Mauro Carvalho Chehab <mchehab@infradead.org>
Original patch from Al Viro <viro@ftp.linux.org.uk>
Date: Sat Mar 29 03:07:38 2008 +0000
NULL noise: drivers/media
kernel-sync:
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux/drivers/media/video')
-rw-r--r-- | linux/drivers/media/video/adv7170.c | 2 | ||||
-rw-r--r-- | linux/drivers/media/video/adv7175.c | 2 | ||||
-rw-r--r-- | linux/drivers/media/video/bt819.c | 2 | ||||
-rw-r--r-- | linux/drivers/media/video/bt856.c | 2 | ||||
-rw-r--r-- | linux/drivers/media/video/dpc7146.c | 2 | ||||
-rw-r--r-- | linux/drivers/media/video/mxb.c | 5 | ||||
-rw-r--r-- | linux/drivers/media/video/pvrusb2/pvrusb2-ctrl.c | 4 | ||||
-rw-r--r-- | linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c | 6 | ||||
-rw-r--r-- | linux/drivers/media/video/pvrusb2/pvrusb2-io.c | 2 | ||||
-rw-r--r-- | linux/drivers/media/video/pvrusb2/pvrusb2-ioread.c | 2 | ||||
-rw-r--r-- | linux/drivers/media/video/pwc/pwc-if.c | 7 | ||||
-rw-r--r-- | linux/drivers/media/video/saa7110.c | 4 | ||||
-rw-r--r-- | linux/drivers/media/video/saa7111.c | 2 | ||||
-rw-r--r-- | linux/drivers/media/video/saa7114.c | 2 | ||||
-rw-r--r-- | linux/drivers/media/video/saa7185.c | 2 | ||||
-rw-r--r-- | linux/drivers/media/video/tda9840.c | 2 | ||||
-rw-r--r-- | linux/drivers/media/video/tea6415c.c | 2 | ||||
-rw-r--r-- | linux/drivers/media/video/tea6420.c | 2 | ||||
-rw-r--r-- | linux/drivers/media/video/tvp5150.c | 4 | ||||
-rw-r--r-- | linux/drivers/media/video/zoran_driver.c | 2 |
20 files changed, 28 insertions, 30 deletions
diff --git a/linux/drivers/media/video/adv7170.c b/linux/drivers/media/video/adv7170.c index 0d15ce53d..54ef7aa63 100644 --- a/linux/drivers/media/video/adv7170.c +++ b/linux/drivers/media/video/adv7170.c @@ -409,7 +409,7 @@ adv7170_detect_client (struct i2c_adapter *adapter, return 0; client = kzalloc(sizeof(struct i2c_client), GFP_KERNEL); - if (client == 0) + if (!client) return -ENOMEM; client->addr = address; client->adapter = adapter; diff --git a/linux/drivers/media/video/adv7175.c b/linux/drivers/media/video/adv7175.c index 86345ba5c..b8618c021 100644 --- a/linux/drivers/media/video/adv7175.c +++ b/linux/drivers/media/video/adv7175.c @@ -427,7 +427,7 @@ adv7175_detect_client (struct i2c_adapter *adapter, return 0; client = kzalloc(sizeof(struct i2c_client), GFP_KERNEL); - if (client == 0) + if (!client) return -ENOMEM; client->addr = address; client->adapter = adapter; diff --git a/linux/drivers/media/video/bt819.c b/linux/drivers/media/video/bt819.c index 9264e2cff..402bccaf7 100644 --- a/linux/drivers/media/video/bt819.c +++ b/linux/drivers/media/video/bt819.c @@ -525,7 +525,7 @@ bt819_detect_client (struct i2c_adapter *adapter, return 0; client = kzalloc(sizeof(struct i2c_client), GFP_KERNEL); - if (client == 0) + if (!client) return -ENOMEM; client->addr = address; client->adapter = adapter; diff --git a/linux/drivers/media/video/bt856.c b/linux/drivers/media/video/bt856.c index 7abfad9a4..50ca987ad 100644 --- a/linux/drivers/media/video/bt856.c +++ b/linux/drivers/media/video/bt856.c @@ -312,7 +312,7 @@ bt856_detect_client (struct i2c_adapter *adapter, return 0; client = kzalloc(sizeof(struct i2c_client), GFP_KERNEL); - if (client == 0) + if (!client) return -ENOMEM; client->addr = address; client->adapter = adapter; diff --git a/linux/drivers/media/video/dpc7146.c b/linux/drivers/media/video/dpc7146.c index 258d46407..4bfb3076b 100644 --- a/linux/drivers/media/video/dpc7146.c +++ b/linux/drivers/media/video/dpc7146.c @@ -132,7 +132,7 @@ static int dpc_probe(struct saa7146_dev* dev) device_for_each_child(&dpc->i2c_adapter.dev, dpc, dpc_check_clients); /* check if all devices are present */ - if( 0 == dpc->saa7111a ) { + if (!dpc->saa7111a) { DEB_D(("dpc_v4l2.o: dpc_attach failed for this device.\n")); i2c_del_adapter(&dpc->i2c_adapter); kfree(dpc); diff --git a/linux/drivers/media/video/mxb.c b/linux/drivers/media/video/mxb.c index 97cc92c82..bf2462a58 100644 --- a/linux/drivers/media/video/mxb.c +++ b/linux/drivers/media/video/mxb.c @@ -222,9 +222,8 @@ static int mxb_probe(struct saa7146_dev* dev) device_for_each_child(&mxb->i2c_adapter.dev, mxb, mxb_check_clients); /* check if all devices are present */ - if( 0 == mxb->tea6420_1 || 0 == mxb->tea6420_2 || 0 == mxb->tea6415c - || 0 == mxb->tda9840 || 0 == mxb->saa7111a || 0 == mxb->tuner ) { - + if (!mxb->tea6420_1 || !mxb->tea6420_2 || !mxb->tea6415c || + !mxb->tda9840 || !mxb->saa7111a || !mxb->tuner) { printk("mxb: did not find all i2c devices. aborting\n"); i2c_del_adapter(&mxb->i2c_adapter); kfree(mxb); diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-ctrl.c b/linux/drivers/media/video/pvrusb2/pvrusb2-ctrl.c index 32e43e9d1..8b500528d 100644 --- a/linux/drivers/media/video/pvrusb2/pvrusb2-ctrl.c +++ b/linux/drivers/media/video/pvrusb2/pvrusb2-ctrl.c @@ -68,7 +68,7 @@ int pvr2_ctrl_set_mask_value(struct pvr2_ctrl *cptr,int mask,int val) int ret = 0; if (!cptr) return -EINVAL; LOCK_TAKE(cptr->hdw->big_lock); do { - if (cptr->info->set_value != 0) { + if (cptr->info->set_value) { if (cptr->info->type == pvr2_ctl_bitmask) { mask &= cptr->info->def.type_bitmask.valid_bits; } else if ((cptr->info->type == pvr2_ctl_int)|| @@ -269,7 +269,7 @@ unsigned int pvr2_ctrl_get_v4lflags(struct pvr2_ctrl *cptr) int pvr2_ctrl_is_writable(struct pvr2_ctrl *cptr) { if (!cptr) return 0; - return cptr->info->set_value != 0; + return cptr->info->set_value != NULL; } diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c b/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c index 77edc72a2..8356bc0e4 100644 --- a/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c +++ b/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c @@ -2357,7 +2357,7 @@ static int pvr2_hdw_commit_setup(struct pvr2_hdw *hdw) for (idx = 0; idx < hdw->control_cnt; idx++) { cptr = hdw->controls + idx; - if (cptr->info->is_dirty == 0) continue; + if (!cptr->info->is_dirty) continue; if (!cptr->info->is_dirty(cptr)) continue; commit_flag = !0; @@ -2706,7 +2706,7 @@ void pvr2_hdw_cpufw_set_enabled(struct pvr2_hdw *hdw, u16 address; unsigned int pipe; LOCK_TAKE(hdw->big_lock); do { - if ((hdw->fw_buffer == 0) == !enable_flag) break; + if ((hdw->fw_buffer == NULL) == !enable_flag) break; if (!enable_flag) { pvr2_trace(PVR2_TRACE_FIRMWARE, @@ -2775,7 +2775,7 @@ void pvr2_hdw_cpufw_set_enabled(struct pvr2_hdw *hdw, /* Return true if we're in a mode for retrieval CPU firmware */ int pvr2_hdw_cpufw_get_enabled(struct pvr2_hdw *hdw) { - return hdw->fw_buffer != 0; + return hdw->fw_buffer != NULL; } diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-io.c b/linux/drivers/media/video/pvrusb2/pvrusb2-io.c index 7b3be67f5..e4aae2c97 100644 --- a/linux/drivers/media/video/pvrusb2/pvrusb2-io.c +++ b/linux/drivers/media/video/pvrusb2/pvrusb2-io.c @@ -603,7 +603,7 @@ void pvr2_stream_kill(struct pvr2_stream *sp) struct pvr2_buffer *bp; mutex_lock(&sp->mutex); do { pvr2_stream_internal_flush(sp); - while ((bp = pvr2_stream_get_ready_buffer(sp)) != 0) { + while ((bp = pvr2_stream_get_ready_buffer(sp)) != NULL) { pvr2_buffer_set_idle(bp); } if (sp->buffer_total_count != sp->buffer_target_count) { diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-ioread.c b/linux/drivers/media/video/pvrusb2/pvrusb2-ioread.c index aef12fecb..d7bbbe00f 100644 --- a/linux/drivers/media/video/pvrusb2/pvrusb2-ioread.c +++ b/linux/drivers/media/video/pvrusb2/pvrusb2-ioread.c @@ -174,7 +174,7 @@ static int pvr2_ioread_start(struct pvr2_ioread *cp) if (!(cp->stream)) return 0; pvr2_trace(PVR2_TRACE_START_STOP, "/*---TRACE_READ---*/ pvr2_ioread_start id=%p",cp); - while ((bp = pvr2_stream_get_idle_buffer(cp->stream)) != 0) { + while ((bp = pvr2_stream_get_idle_buffer(cp->stream)) != NULL) { stat = pvr2_buffer_queue(bp); if (stat < 0) { pvr2_trace(PVR2_TRACE_DATA_FLOW, diff --git a/linux/drivers/media/video/pwc/pwc-if.c b/linux/drivers/media/video/pwc/pwc-if.c index 6a7db17ba..8236b2b2d 100644 --- a/linux/drivers/media/video/pwc/pwc-if.c +++ b/linux/drivers/media/video/pwc/pwc-if.c @@ -929,7 +929,7 @@ static void pwc_iso_stop(struct pwc_device *pdev) struct urb *urb; urb = pdev->sbuf[i].urb; - if (urb != 0) { + if (urb) { PWC_DEBUG_MEMORY("Unlinking URB %p\n", urb); usb_kill_urb(urb); } @@ -945,7 +945,7 @@ static void pwc_iso_free(struct pwc_device *pdev) struct urb *urb; urb = pdev->sbuf[i].urb; - if (urb != 0) { + if (urb) { PWC_DEBUG_MEMORY("Freeing URB\n"); usb_free_urb(urb); pdev->sbuf[i].urb = NULL; @@ -1784,8 +1784,7 @@ static int usb_pwc_probe(struct usb_interface *intf, const struct usb_device_id /* Allocate video_device structure */ pdev->vdev = video_device_alloc(); - if (pdev->vdev == 0) - { + if (!pdev->vdev) { PWC_ERROR("Err, cannot allocate video_device struture. Failing probe."); kfree(pdev); return -ENOMEM; diff --git a/linux/drivers/media/video/saa7110.c b/linux/drivers/media/video/saa7110.c index eb561ce6c..0692e4bef 100644 --- a/linux/drivers/media/video/saa7110.c +++ b/linux/drivers/media/video/saa7110.c @@ -489,7 +489,7 @@ saa7110_detect_client (struct i2c_adapter *adapter, return 0; client = kzalloc(sizeof(struct i2c_client), GFP_KERNEL); - if (client == 0) + if (!client) return -ENOMEM; client->addr = address; client->adapter = adapter; @@ -497,7 +497,7 @@ saa7110_detect_client (struct i2c_adapter *adapter, strlcpy(I2C_NAME(client), "saa7110", sizeof(I2C_NAME(client))); decoder = kzalloc(sizeof(struct saa7110), GFP_KERNEL); - if (decoder == 0) { + if (!decoder) { kfree(client); return -ENOMEM; } diff --git a/linux/drivers/media/video/saa7111.c b/linux/drivers/media/video/saa7111.c index df44aed92..917fb2553 100644 --- a/linux/drivers/media/video/saa7111.c +++ b/linux/drivers/media/video/saa7111.c @@ -503,7 +503,7 @@ saa7111_detect_client (struct i2c_adapter *adapter, return 0; client = kzalloc(sizeof(struct i2c_client), GFP_KERNEL); - if (client == 0) + if (!client) return -ENOMEM; client->addr = address; client->adapter = adapter; diff --git a/linux/drivers/media/video/saa7114.c b/linux/drivers/media/video/saa7114.c index ebf42cf9e..158bd123c 100644 --- a/linux/drivers/media/video/saa7114.c +++ b/linux/drivers/media/video/saa7114.c @@ -842,7 +842,7 @@ saa7114_detect_client (struct i2c_adapter *adapter, return 0; client = kzalloc(sizeof(struct i2c_client), GFP_KERNEL); - if (client == 0) + if (!client) return -ENOMEM; client->addr = address; client->adapter = adapter; diff --git a/linux/drivers/media/video/saa7185.c b/linux/drivers/media/video/saa7185.c index 2ac144d9a..7a6c9c1fb 100644 --- a/linux/drivers/media/video/saa7185.c +++ b/linux/drivers/media/video/saa7185.c @@ -404,7 +404,7 @@ saa7185_detect_client (struct i2c_adapter *adapter, return 0; client = kzalloc(sizeof(struct i2c_client), GFP_KERNEL); - if (client == 0) + if (!client) return -ENOMEM; client->addr = address; client->adapter = adapter; diff --git a/linux/drivers/media/video/tda9840.c b/linux/drivers/media/video/tda9840.c index 72b6f476c..c41e50ba6 100644 --- a/linux/drivers/media/video/tda9840.c +++ b/linux/drivers/media/video/tda9840.c @@ -181,7 +181,7 @@ static int detect(struct i2c_adapter *adapter, int address, int kind) /* allocate memory for client structure */ client = kmalloc(sizeof(struct i2c_client), GFP_KERNEL); - if (0 == client) { + if (!client) { printk("not enough kernel memory\n"); return -ENOMEM; } diff --git a/linux/drivers/media/video/tea6415c.c b/linux/drivers/media/video/tea6415c.c index 363b5be2c..16f369195 100644 --- a/linux/drivers/media/video/tea6415c.c +++ b/linux/drivers/media/video/tea6415c.c @@ -73,7 +73,7 @@ static int detect(struct i2c_adapter *adapter, int address, int kind) /* allocate memory for client structure */ client = kmalloc(sizeof(struct i2c_client), GFP_KERNEL); - if (0 == client) { + if (!client) { return -ENOMEM; } diff --git a/linux/drivers/media/video/tea6420.c b/linux/drivers/media/video/tea6420.c index 0e3e039f2..7a8fec9cf 100644 --- a/linux/drivers/media/video/tea6420.c +++ b/linux/drivers/media/video/tea6420.c @@ -110,7 +110,7 @@ static int tea6420_detect(struct i2c_adapter *adapter, int address, int kind) /* allocate memory for client structure */ client = kzalloc(sizeof(struct i2c_client), GFP_KERNEL); - if (0 == client) { + if (!client) { return -ENOMEM; } diff --git a/linux/drivers/media/video/tvp5150.c b/linux/drivers/media/video/tvp5150.c index e6907db8b..7dc6623cc 100644 --- a/linux/drivers/media/video/tvp5150.c +++ b/linux/drivers/media/video/tvp5150.c @@ -1175,12 +1175,12 @@ static int tvp5150_detect_client(struct i2c_adapter *adapter, return 0; c = kmalloc(sizeof(struct i2c_client), GFP_KERNEL); - if (c == 0) + if (!c) return -ENOMEM; memcpy(c, &client_template, sizeof(struct i2c_client)); core = kzalloc(sizeof(struct tvp5150), GFP_KERNEL); - if (core == 0) { + if (!core) { kfree(c); return -ENOMEM; } diff --git a/linux/drivers/media/video/zoran_driver.c b/linux/drivers/media/video/zoran_driver.c index aede0b584..39b681f1f 100644 --- a/linux/drivers/media/video/zoran_driver.c +++ b/linux/drivers/media/video/zoran_driver.c @@ -353,7 +353,7 @@ v4l_fbuffer_alloc (struct file *file) /* Use kmalloc */ mem = kmalloc(fh->v4l_buffers.buffer_size, GFP_KERNEL); - if (mem == 0) { + if (!mem) { dprintk(1, KERN_ERR "%s: v4l_fbuffer_alloc() - kmalloc for V4L buf %d failed\n", |