.s_ctrl = em28xx_s_ctrl,
};
-static int check_dev(struct em28xx *dev)
-{
- if (dev->disconnected) {
- em28xx_errdev("v4l2 ioctl: device not present\n");
- return -ENODEV;
- }
- return 0;
-}
-
static void get_scale(struct em28xx *dev,
unsigned int width, unsigned int height,
unsigned int *hscale, unsigned int *vscale)
{
struct em28xx_fh *fh = priv;
struct em28xx *dev = fh->dev;
- int rc;
-
- rc = check_dev(dev);
- if (rc < 0)
- return rc;
*norm = dev->norm;
{
struct em28xx_fh *fh = priv;
struct em28xx *dev = fh->dev;
- int rc;
-
- rc = check_dev(dev);
- if (rc < 0)
- return rc;
v4l2_device_call_all(&dev->v4l2_dev, 0, video, querystd, norm);
struct em28xx_fh *fh = priv;
struct em28xx *dev = fh->dev;
struct v4l2_format f;
- int rc;
if (*norm == dev->norm)
return 0;
- rc = check_dev(dev);
- if (rc < 0)
- return rc;
if (dev->streaming_users > 0)
return -EBUSY;
{
struct em28xx_fh *fh = priv;
struct em28xx *dev = fh->dev;
- int rc;
-
- rc = check_dev(dev);
- if (rc < 0)
- return rc;
if (i >= MAX_EM28XX_INPUT)
return -EINVAL;
{
struct em28xx_fh *fh = priv;
struct em28xx *dev = fh->dev;
- int rc;
-
- rc = check_dev(dev);
- if (rc < 0)
- return rc;
if (0 != t->index)
return -EINVAL;
{
struct em28xx_fh *fh = priv;
struct em28xx *dev = fh->dev;
- int rc;
-
- rc = check_dev(dev);
- if (rc < 0)
- return rc;
if (0 != t->index)
return -EINVAL;
{
struct em28xx_fh *fh = priv;
struct em28xx *dev = fh->dev;
- int rc;
-
- rc = check_dev(dev);
- if (rc < 0)
- return rc;
if (0 != f->tuner)
return -EINVAL;