aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/pvrusb2/pvrusb2-hdw.c
diff options
context:
space:
mode:
authorMike Isely <isely@pobox.com>2006-09-28 16:53:49 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2006-10-03 14:14:26 -0400
commit6d98816fbe2b0a6887de0237021d6d900fbaff84 (patch)
treefaeea00edb09d532cb1a01653553d9983cc77f9c /drivers/media/video/pvrusb2/pvrusb2-hdw.c
parentab9caf9e221ee1b13186a9144da26ac358f2a6f4 (diff)
V4L/DVB (4675): Pvrusb2: Fix VIDIOC_INT_[G|S]_REGISTER so that it actually works now
Signed-off-by: Mike Isely <isely@pobox.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/pvrusb2/pvrusb2-hdw.c')
-rw-r--r--drivers/media/video/pvrusb2/pvrusb2-hdw.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/media/video/pvrusb2/pvrusb2-hdw.c b/drivers/media/video/pvrusb2/pvrusb2-hdw.c
index 11a327d167be..3d8cd0daf6a9 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-hdw.c
+++ b/drivers/media/video/pvrusb2/pvrusb2-hdw.c
@@ -3140,7 +3140,8 @@ int pvr2_hdw_register_access(struct pvr2_hdw *hdw,
3140 struct list_head *item; 3140 struct list_head *item;
3141 struct pvr2_i2c_client *cp; 3141 struct pvr2_i2c_client *cp;
3142 struct v4l2_register req; 3142 struct v4l2_register req;
3143 int stat; 3143 int stat = 0;
3144 int okFl = 0;
3144 3145
3145 req.i2c_id = chip_id; 3146 req.i2c_id = chip_id;
3146 req.reg = reg_id; 3147 req.reg = reg_id;
@@ -3153,9 +3154,13 @@ int pvr2_hdw_register_access(struct pvr2_hdw *hdw,
3153 cp,(setFl ? VIDIOC_INT_S_REGISTER : 3154 cp,(setFl ? VIDIOC_INT_S_REGISTER :
3154 VIDIOC_INT_G_REGISTER),&req); 3155 VIDIOC_INT_G_REGISTER),&req);
3155 if (!setFl) *val_ptr = req.val; 3156 if (!setFl) *val_ptr = req.val;
3156 return stat; 3157 okFl = !0;
3158 break;
3157 } 3159 }
3158 } while (0); mutex_unlock(&hdw->i2c_list_lock); 3160 } while (0); mutex_unlock(&hdw->i2c_list_lock);
3161 if (okFl) {
3162 return stat;
3163 }
3159 return -EINVAL; 3164 return -EINVAL;
3160#else 3165#else
3161 return -ENOSYS; 3166 return -ENOSYS;