From: "Frank Schäfer" <fschaefer.oss@googlemail.com>
To: "Frank Schäfer" <fschaefer.oss@googlemail.com>
Cc: mchehab@redhat.com, linux-media@vger.kernel.org, hans.verkuil@cisco.com
Subject: Re: [PATCH] em28xx: return -ENOTTY for tuner + frequency + VBI-format ioctls if the device is a webcam
Date: Sat, 12 Jan 2013 19:10:18 +0100 [thread overview]
Message-ID: <50F1A70A.5080600@googlemail.com> (raw)
In-Reply-To: <1358013084-5748-1-git-send-email-fschaefer.oss@googlemail.com>
Am 12.01.2013 18:51, schrieb Frank Schäfer:
> Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
> ---
> drivers/media/usb/em28xx/em28xx-video.c | 14 ++++++++++++++
> 1 Datei geändert, 14 Zeilen hinzugefügt(+)
>
> diff --git a/drivers/media/usb/em28xx/em28xx-video.c b/drivers/media/usb/em28xx/em28xx-video.c
> index 2eabf2a..1d1ef68 100644
> --- a/drivers/media/usb/em28xx/em28xx-video.c
> +++ b/drivers/media/usb/em28xx/em28xx-video.c
> @@ -1204,6 +1204,8 @@ static int vidioc_g_tuner(struct file *file, void *priv,
> struct em28xx *dev = fh->dev;
> int rc;
>
> + if (dev->board.is_webcam)
> + return -ENOTTY;
> rc = check_dev(dev);
> if (rc < 0)
> return rc;
> @@ -1224,6 +1226,8 @@ static int vidioc_s_tuner(struct file *file, void *priv,
> struct em28xx *dev = fh->dev;
> int rc;
>
> + if (dev->board.is_webcam)
> + return -ENOTTY;
> rc = check_dev(dev);
> if (rc < 0)
> return rc;
> @@ -1241,6 +1245,8 @@ static int vidioc_g_frequency(struct file *file, void *priv,
> struct em28xx_fh *fh = priv;
> struct em28xx *dev = fh->dev;
>
> + if (dev->board.is_webcam)
> + return -ENOTTY;
> if (0 != f->tuner)
> return -EINVAL;
>
> @@ -1255,6 +1261,8 @@ static int vidioc_s_frequency(struct file *file, void *priv,
> struct em28xx *dev = fh->dev;
> int rc;
>
> + if (dev->board.is_webcam)
> + return -ENOTTY;
> rc = check_dev(dev);
> if (rc < 0)
> return rc;
> @@ -1499,6 +1507,9 @@ static int vidioc_g_fmt_vbi_cap(struct file *file, void *priv,
> struct em28xx_fh *fh = priv;
> struct em28xx *dev = fh->dev;
>
> + if (dev->board.is_webcam)
> + return -ENOTTY;
> +
> format->fmt.vbi.samples_per_line = dev->vbi_width;
> format->fmt.vbi.sample_format = V4L2_PIX_FMT_GREY;
> format->fmt.vbi.offset = 0;
> @@ -1528,6 +1539,9 @@ static int vidioc_s_fmt_vbi_cap(struct file *file, void *priv,
> struct em28xx_fh *fh = priv;
> struct em28xx *dev = fh->dev;
>
> + if (dev->board.is_webcam)
> + return -ENOTTY;
> +
> format->fmt.vbi.samples_per_line = dev->vbi_width;
> format->fmt.vbi.sample_format = V4L2_PIX_FMT_GREY;
> format->fmt.vbi.offset = 0;
Please disregard this patch, I will send a better one tomorrow.
Regards,
Frank
prev parent reply other threads:[~2013-01-12 18:09 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-12 17:51 [PATCH] em28xx: return -ENOTTY for tuner + frequency + VBI-format ioctls if the device is a webcam Frank Schäfer
2013-01-12 18:10 ` Frank Schäfer [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=50F1A70A.5080600@googlemail.com \
--to=fschaefer.oss@googlemail.com \
--cc=hans.verkuil@cisco.com \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.