summaryrefslogtreecommitdiff
path: root/linux
diff options
context:
space:
mode:
authorMike Isely <isely@pobox.com>2006-09-28 17:53:49 -0300
committerMike Isely <isely@pobox.com>2006-09-28 17:53:49 -0300
commit5a8d592ca3b750889157d08b2e349e036a678663 (patch)
tree652dece17c81ef853a5b1564602013b4ae366655 /linux
parentb14a545b35a3d6187c96e18c07568b3f42a0ee1c (diff)
downloadmediapointer-dvb-s2-5a8d592ca3b750889157d08b2e349e036a678663.tar.gz
mediapointer-dvb-s2-5a8d592ca3b750889157d08b2e349e036a678663.tar.bz2
pvrusb2: Fix VIDIOC_INT_[G|S]_REGISTER so that it actually works now
From: Mike Isely <isely@pobox.com> Signed-off-by: Mike Isely <isely@pobox.com>
Diffstat (limited to 'linux')
-rw-r--r--linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c9
-rw-r--r--linux/drivers/media/video/pvrusb2/pvrusb2-v4l2.c2
2 files changed, 8 insertions, 3 deletions
diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c b/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c
index f6e5771f4..065ccb0bb 100644
--- a/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c
+++ b/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c
@@ -3245,7 +3245,8 @@ int pvr2_hdw_register_access(struct pvr2_hdw *hdw,
struct list_head *item;
struct pvr2_i2c_client *cp;
struct v4l2_register req;
- int stat;
+ int stat = 0;
+ int okFl = 0;
req.i2c_id = chip_id;
req.reg = reg_id;
@@ -3258,9 +3259,13 @@ int pvr2_hdw_register_access(struct pvr2_hdw *hdw,
cp,(setFl ? VIDIOC_INT_S_REGISTER :
VIDIOC_INT_G_REGISTER),&req);
if (!setFl) *val_ptr = req.val;
- return stat;
+ okFl = !0;
+ break;
}
} while (0); mutex_unlock(&hdw->i2c_list_lock);
+ if (okFl) {
+ return stat;
+ }
return -EINVAL;
#else
return -ENOSYS;
diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-v4l2.c b/linux/drivers/media/video/pvrusb2/pvrusb2-v4l2.c
index 0da6c9ec6..6b72efd56 100644
--- a/linux/drivers/media/video/pvrusb2/pvrusb2-v4l2.c
+++ b/linux/drivers/media/video/pvrusb2/pvrusb2-v4l2.c
@@ -687,7 +687,7 @@ static int pvr2_v4l2_do_ioctl(struct inode *inode, struct file *file,
ret = pvr2_hdw_register_access(
hdw,req->i2c_id,req->reg,
cmd == VIDIOC_INT_S_REGISTER,&val);
- if (cmd == 0) req->val = val;
+ if (cmd == VIDIOC_INT_G_REGISTER) req->val = val;
break;
}
#endif