diff options
author | Devin Heitmueller <dheitmueller@linuxtv.org> | 2009-03-15 16:38:47 -0400 |
---|---|---|
committer | Devin Heitmueller <dheitmueller@linuxtv.org> | 2009-03-15 16:38:47 -0400 |
commit | daf697d13efd2ada0b4f50128adc6b8e88ff5252 (patch) | |
tree | 990c6a511d6182b258fdd6484fd9fe3744133579 /linux | |
parent | a0600eb3e37815b9a780193dc7c9e4dff4cc9291 (diff) | |
download | mediapointer-dvb-s2-daf697d13efd2ada0b4f50128adc6b8e88ff5252.tar.gz mediapointer-dvb-s2-daf697d13efd2ada0b4f50128adc6b8e88ff5252.tar.bz2 |
au0828: remove memset calls in v4l2 routines.
From: Devin Heitmueller <dheitmueller@linuxtv.org>
The userland callers are responsible for clearing the output buffers, so
remove the unneeded memset calls.
Thanks to Mauro Carvalho Chehab <mchehab@infradead.org> for pointing this out.
Priority: normal
Signed-off-by: Devin Heitmueller <dheitmueller@linuxtv.org>
Diffstat (limited to 'linux')
-rw-r--r-- | linux/drivers/media/video/au0828/au0828-video.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/linux/drivers/media/video/au0828/au0828-video.c b/linux/drivers/media/video/au0828/au0828-video.c index 72f2b67cb..5c590c52c 100644 --- a/linux/drivers/media/video/au0828/au0828-video.c +++ b/linux/drivers/media/video/au0828/au0828-video.c @@ -1022,7 +1022,6 @@ static int vidioc_querycap(struct file *file, void *priv, struct au0828_fh *fh = priv; struct au0828_dev *dev = fh->dev; - memset(cap, 0, sizeof(*cap)); strlcpy(cap->driver, "au0828", sizeof(cap->driver)); strlcpy(cap->card, dev->board.name, sizeof(cap->card)); strlcpy(cap->bus_info, dev->v4l2_dev.name, sizeof(cap->bus_info)); @@ -1047,14 +1046,12 @@ static int vidioc_enum_fmt_vid_cap(struct file *file, void *priv, if(f->index) return -EINVAL; - memset(f, 0, sizeof(*f)); f->type = V4L2_BUF_TYPE_VIDEO_CAPTURE; strcpy(f->description, "Packed YUV2"); f->flags = 0; f->pixelformat = V4L2_PIX_FMT_UYVY; - memset(f->reserved, 0, sizeof(f->reserved)); return 0; } @@ -1143,7 +1140,6 @@ static int vidioc_enum_input(struct file *file, void *priv, if(AUVI_INPUT(tmp).type == 0) return -EINVAL; - memset(input, 0, sizeof(*input)); input->index = tmp; strcpy(input->name, inames[AUVI_INPUT(tmp).type]); if((AUVI_INPUT(tmp).type == AU0828_VMUX_TELEVISION) || @@ -1241,7 +1237,6 @@ static int vidioc_g_audio(struct file *file, void *priv, struct v4l2_audio *a) if(a->index > 1) return -EINVAL; - memset(a, 0, sizeof(*a)); index = dev->ctrl_ainput; if(index == 0) strcpy(a->name, "Television"); @@ -1290,7 +1285,6 @@ static int vidioc_g_tuner(struct file *file, void *priv, struct v4l2_tuner *t) if(t->index != 0) return -EINVAL; - memset(t, 0, sizeof(*t)); strcpy(t->name, "Auvitek tuner"); au0828_call_i2c_clients(dev, VIDIOC_G_TUNER, t); @@ -1319,7 +1313,7 @@ static int vidioc_g_frequency(struct file *file, void *priv, { struct au0828_fh *fh = priv; struct au0828_dev *dev = fh->dev; - memset(freq, 0, sizeof(*freq)); + freq->type = V4L2_TUNER_ANALOG_TV; freq->frequency = dev->ctrl_freq; return 0; |