From 23fb60e03b25fa009ed530d83c5cb7463b96bdc9 Mon Sep 17 00:00:00 2001 From: Mike Isely Date: Sat, 25 Mar 2006 16:45:28 -0600 Subject: pvrusb2 control commit handling fix From: Mike Isely When a control change is committed to the driver, certain other parts of the driver must be updated to track the change and deal with the effects of that change. Some controls in the driver use a function pointer to implement the commit, however we weren't doing the tracking there and we should have been. This is the fix. Signed-off-by: Mike Isely --- linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'linux/drivers/media') diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c b/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c index ed5e81224..231c314f4 100644 --- a/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c +++ b/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c @@ -1490,11 +1490,15 @@ int pvr2_hdw_get_ctl_max_value(struct pvr2_hdw *hdw,unsigned int ctl_id) int pvr2_hdw_set_ctl_value_internal(struct pvr2_hdw *hdw, unsigned int ctl_id,int value) { + int ret; if (ctl_id >= PVR2_CID_COUNT) return -EINVAL; if (value < control_defs[ctl_id].min_value) return -EINVAL; if (value > control_defs[ctl_id].max_value) return -EINVAL; if (control_defs[ctl_id].set_func) { - return control_defs[ctl_id].set_func(hdw,ctl_id,value); + ret = control_defs[ctl_id].set_func(hdw,ctl_id,value); + pvr2_i2c_core_check_stale(hdw); + pvr2_i2c_core_sync(hdw); + return ret; } else if (control_defs[ctl_id].get_func) { /* If there's no "set" function yet there is still a "get" function, then treat this as a read-only value. */ -- cgit v1.2.3