diff options
Diffstat (limited to 'drivers/media/video/pvrusb2')
-rw-r--r-- | drivers/media/video/pvrusb2/Kconfig | 1 | ||||
-rw-r--r-- | drivers/media/video/pvrusb2/pvrusb2-v4l2.c | 12 |
2 files changed, 2 insertions, 11 deletions
diff --git a/drivers/media/video/pvrusb2/Kconfig b/drivers/media/video/pvrusb2/Kconfig index f9b6001e1dd7..25e412ecad2c 100644 --- a/drivers/media/video/pvrusb2/Kconfig +++ b/drivers/media/video/pvrusb2/Kconfig | |||
@@ -1,7 +1,6 @@ | |||
1 | config VIDEO_PVRUSB2 | 1 | config VIDEO_PVRUSB2 |
2 | tristate "Hauppauge WinTV-PVR USB2 support" | 2 | tristate "Hauppauge WinTV-PVR USB2 support" |
3 | depends on VIDEO_V4L2 && I2C | 3 | depends on VIDEO_V4L2 && I2C |
4 | depends on VIDEO_MEDIA # Avoids pvrusb = Y / DVB = M | ||
5 | select VIDEO_TUNER | 4 | select VIDEO_TUNER |
6 | select VIDEO_TVEEPROM | 5 | select VIDEO_TVEEPROM |
7 | select VIDEO_CX2341X | 6 | select VIDEO_CX2341X |
diff --git a/drivers/media/video/pvrusb2/pvrusb2-v4l2.c b/drivers/media/video/pvrusb2/pvrusb2-v4l2.c index 7bddfaeeafc3..f344aed32a93 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-v4l2.c +++ b/drivers/media/video/pvrusb2/pvrusb2-v4l2.c | |||
@@ -226,13 +226,11 @@ static int pvr2_enum_input(struct file *file, void *priv, struct v4l2_input *vi) | |||
226 | struct v4l2_input tmp; | 226 | struct v4l2_input tmp; |
227 | unsigned int cnt; | 227 | unsigned int cnt; |
228 | int val; | 228 | int val; |
229 | int ret; | ||
230 | 229 | ||
231 | cptr = pvr2_hdw_get_ctrl_by_id(hdw, PVR2_CID_INPUT); | 230 | cptr = pvr2_hdw_get_ctrl_by_id(hdw, PVR2_CID_INPUT); |
232 | 231 | ||
233 | memset(&tmp, 0, sizeof(tmp)); | 232 | memset(&tmp, 0, sizeof(tmp)); |
234 | tmp.index = vi->index; | 233 | tmp.index = vi->index; |
235 | ret = 0; | ||
236 | if (vi->index >= fh->input_cnt) | 234 | if (vi->index >= fh->input_cnt) |
237 | return -EINVAL; | 235 | return -EINVAL; |
238 | val = fh->input_map[vi->index]; | 236 | val = fh->input_map[vi->index]; |
@@ -556,9 +554,7 @@ static int pvr2_queryctrl(struct file *file, void *priv, | |||
556 | struct pvr2_hdw *hdw = fh->channel.mc_head->hdw; | 554 | struct pvr2_hdw *hdw = fh->channel.mc_head->hdw; |
557 | struct pvr2_ctrl *cptr; | 555 | struct pvr2_ctrl *cptr; |
558 | int val; | 556 | int val; |
559 | int ret; | ||
560 | 557 | ||
561 | ret = 0; | ||
562 | if (vc->id & V4L2_CTRL_FLAG_NEXT_CTRL) { | 558 | if (vc->id & V4L2_CTRL_FLAG_NEXT_CTRL) { |
563 | cptr = pvr2_hdw_get_ctrl_nextv4l( | 559 | cptr = pvr2_hdw_get_ctrl_nextv4l( |
564 | hdw, (vc->id & ~V4L2_CTRL_FLAG_NEXT_CTRL)); | 560 | hdw, (vc->id & ~V4L2_CTRL_FLAG_NEXT_CTRL)); |
@@ -705,11 +701,9 @@ static int pvr2_try_ext_ctrls(struct file *file, void *priv, | |||
705 | struct v4l2_ext_control *ctrl; | 701 | struct v4l2_ext_control *ctrl; |
706 | struct pvr2_ctrl *pctl; | 702 | struct pvr2_ctrl *pctl; |
707 | unsigned int idx; | 703 | unsigned int idx; |
708 | int ret; | ||
709 | 704 | ||
710 | /* For the moment just validate that the requested control | 705 | /* For the moment just validate that the requested control |
711 | actually exists. */ | 706 | actually exists. */ |
712 | ret = 0; | ||
713 | for (idx = 0; idx < ctls->count; idx++) { | 707 | for (idx = 0; idx < ctls->count; idx++) { |
714 | ctrl = ctls->controls + idx; | 708 | ctrl = ctls->controls + idx; |
715 | pctl = pvr2_hdw_get_ctrl_v4l(hdw, ctrl->id); | 709 | pctl = pvr2_hdw_get_ctrl_v4l(hdw, ctrl->id); |
@@ -770,12 +764,10 @@ static int pvr2_s_crop(struct file *file, void *priv, struct v4l2_crop *crop) | |||
770 | { | 764 | { |
771 | struct pvr2_v4l2_fh *fh = file->private_data; | 765 | struct pvr2_v4l2_fh *fh = file->private_data; |
772 | struct pvr2_hdw *hdw = fh->channel.mc_head->hdw; | 766 | struct pvr2_hdw *hdw = fh->channel.mc_head->hdw; |
773 | struct v4l2_cropcap cap; | ||
774 | int ret; | 767 | int ret; |
775 | 768 | ||
776 | if (crop->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) | 769 | if (crop->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) |
777 | return -EINVAL; | 770 | return -EINVAL; |
778 | cap.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; | ||
779 | ret = pvr2_ctrl_set_value( | 771 | ret = pvr2_ctrl_set_value( |
780 | pvr2_hdw_get_ctrl_by_id(hdw, PVR2_CID_CROPL), | 772 | pvr2_hdw_get_ctrl_by_id(hdw, PVR2_CID_CROPL), |
781 | crop->c.left); | 773 | crop->c.left); |
@@ -965,7 +957,7 @@ static long pvr2_v4l2_ioctl(struct file *file, | |||
965 | long ret = -EINVAL; | 957 | long ret = -EINVAL; |
966 | 958 | ||
967 | if (pvrusb2_debug & PVR2_TRACE_V4LIOCTL) | 959 | if (pvrusb2_debug & PVR2_TRACE_V4LIOCTL) |
968 | v4l_print_ioctl(pvr2_hdw_get_driver_name(hdw), cmd); | 960 | v4l_printk_ioctl(pvr2_hdw_get_driver_name(hdw), cmd); |
969 | 961 | ||
970 | if (!pvr2_hdw_dev_ok(hdw)) { | 962 | if (!pvr2_hdw_dev_ok(hdw)) { |
971 | pvr2_trace(PVR2_TRACE_ERROR_LEGS, | 963 | pvr2_trace(PVR2_TRACE_ERROR_LEGS, |
@@ -998,7 +990,7 @@ static long pvr2_v4l2_ioctl(struct file *file, | |||
998 | pvr2_trace(PVR2_TRACE_V4LIOCTL, | 990 | pvr2_trace(PVR2_TRACE_V4LIOCTL, |
999 | "pvr2_v4l2_do_ioctl failure, ret=%ld" | 991 | "pvr2_v4l2_do_ioctl failure, ret=%ld" |
1000 | " command was:", ret); | 992 | " command was:", ret); |
1001 | v4l_print_ioctl(pvr2_hdw_get_driver_name(hdw), | 993 | v4l_printk_ioctl(pvr2_hdw_get_driver_name(hdw), |
1002 | cmd); | 994 | cmd); |
1003 | } | 995 | } |
1004 | } | 996 | } |