V4L/DVB (8958): zr36067: Return proper bytes-per-line value
authorJean Delvare <khali@linux-fr.org>
Sun, 7 Sep 2008 08:56:55 +0000 (05:56 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Sun, 5 Oct 2008 01:38:49 +0000 (22:38 -0300)
commitbba4449c637660d5a8b2aee5ad0206df9fd6f334
tree0ed246fe242354b8626ae8a65d11acb091a4d870
parentc014ec90bc1b951e3fff89bc6ba826b8ef0f444b
V4L/DVB (8958): zr36067: Return proper bytes-per-line value

The zr36067 driver should return the actual bytes-per-line value when
queried with ioctl VIDIOC_G_FMT, instead of 0. Otherwise user-space
applications can get confused.

Likewise, with ioctl VIDIOC_S_FMT, we are supposed to fill the
bytes-per-line value. And we shouldn't fail if the caller sets the
initial value to something different from 0. This is perfectly valid
for applications to pre-fill this field with the value they expect.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/zoran_driver.c