{
int ret, fps, snapshot, compression, pixelformat;
+ if (!pdev->udev)
+ return -ENODEV;
+
ret = pwc_vidioc_try_fmt(pdev, f);
if (ret<0)
return ret;
struct video_device *vdev = video_devdata(file);
struct pwc_device *pdev = video_drvdata(file);
+ if (!pdev->udev)
+ return -ENODEV;
+
strcpy(cap->driver, PWC_NAME);
strlcpy(cap->card, vdev->name, sizeof(cap->card));
usb_make_path(pdev->udev, cap->bus_info, sizeof(cap->bus_info));
struct pwc_device *pdev = video_drvdata(file);
int ret;
+ if (!pdev->udev)
+ return -ENODEV;
+
switch (c->id) {
case V4L2_CID_BRIGHTNESS:
c->value = pwc_get_brightness(pdev);
struct pwc_device *pdev = video_drvdata(file);
int ret;
+ if (!pdev->udev)
+ return -ENODEV;
+
switch (c->id) {
case V4L2_CID_BRIGHTNESS:
c->value <<= 9;
{
struct pwc_device *pdev = video_drvdata(file);
+ if (!pdev->udev)
+ return -ENODEV;
+
return vb2_qbuf(&pdev->vb_queue, buf);
}
{
struct pwc_device *pdev = video_drvdata(file);
+ if (!pdev->udev)
+ return -ENODEV;
+
return vb2_dqbuf(&pdev->vb_queue, buf, file->f_flags & O_NONBLOCK);
}
{
struct pwc_device *pdev = video_drvdata(file);
+ if (!pdev->udev)
+ return -ENODEV;
+
return vb2_streamon(&pdev->vb_queue, i);
}
{
struct pwc_device *pdev = video_drvdata(file);
+ if (!pdev->udev)
+ return -ENODEV;
+
return vb2_streamoff(&pdev->vb_queue, i);
}