Message ID | 201301281511.53915.linux@rainbow-software.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Mon January 28 2013 15:11:53 Ondrej Zary wrote: > Make saa7134 driver more V4L2 compliant: clear VBI structure completely > before assigning values to make sure any reserved space is cleared > > Signed-off-by: Ondrej Zary <linux@rainbow-software.org> > --- > drivers/media/pci/saa7134/saa7134-video.c | 1 + > 1 files changed, 1 insertions(+), 0 deletions(-) > > diff --git a/drivers/media/pci/saa7134/saa7134-video.c > b/drivers/media/pci/saa7134/saa7134-video.c > index 3e88041..adb83b5 100644 > --- a/drivers/media/pci/saa7134/saa7134-video.c > +++ b/drivers/media/pci/saa7134/saa7134-video.c > @@ -1552,6 +1552,7 @@ static int saa7134_try_get_set_fmt_vbi_cap(struct file > *file, void *priv, > struct saa7134_dev *dev = fh->dev; > struct saa7134_tvnorm *norm = dev->tvnorm; > > + memset(&f->fmt.vbi, 0, sizeof(f->fmt.vbi)); I prefer: memset(&f->fmt.vbi.reserved, 0, sizeof(f->fmt.vbi.reserved)); After all, that's the only thing that needs clearing. Regards, Hans > f->fmt.vbi.sampling_rate = 6750000 * 4; > f->fmt.vbi.samples_per_line = 2048 /* VBI_LINE_LENGTH */; > f->fmt.vbi.sample_format = V4L2_PIX_FMT_GREY; > -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/media/pci/saa7134/saa7134-video.c b/drivers/media/pci/saa7134/saa7134-video.c index 3e88041..adb83b5 100644 --- a/drivers/media/pci/saa7134/saa7134-video.c +++ b/drivers/media/pci/saa7134/saa7134-video.c @@ -1552,6 +1552,7 @@ static int saa7134_try_get_set_fmt_vbi_cap(struct file *file, void *priv, struct saa7134_dev *dev = fh->dev; struct saa7134_tvnorm *norm = dev->tvnorm; + memset(&f->fmt.vbi, 0, sizeof(f->fmt.vbi)); f->fmt.vbi.sampling_rate = 6750000 * 4; f->fmt.vbi.samples_per_line = 2048 /* VBI_LINE_LENGTH */;
Make saa7134 driver more V4L2 compliant: clear VBI structure completely before assigning values to make sure any reserved space is cleared Signed-off-by: Ondrej Zary <linux@rainbow-software.org> --- drivers/media/pci/saa7134/saa7134-video.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) f->fmt.vbi.sample_format = V4L2_PIX_FMT_GREY;