aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/pvrusb2/pvrusb2-ctrl.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/pvrusb2/pvrusb2-ctrl.c')
-rw-r--r--drivers/media/video/pvrusb2/pvrusb2-ctrl.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/media/video/pvrusb2/pvrusb2-ctrl.c b/drivers/media/video/pvrusb2/pvrusb2-ctrl.c
index 0764fbfffb73..203f54cd18a1 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-ctrl.c
+++ b/drivers/media/video/pvrusb2/pvrusb2-ctrl.c
@@ -134,13 +134,17 @@ int pvr2_ctrl_get_min(struct pvr2_ctrl *cptr)
134 134
135 135
136/* Retrieve control's default value (any type) */ 136/* Retrieve control's default value (any type) */
137int pvr2_ctrl_get_def(struct pvr2_ctrl *cptr) 137int pvr2_ctrl_get_def(struct pvr2_ctrl *cptr, int *valptr)
138{ 138{
139 int ret = 0; 139 int ret = 0;
140 if (!cptr) return 0; 140 if (!cptr) return 0;
141 LOCK_TAKE(cptr->hdw->big_lock); do { 141 LOCK_TAKE(cptr->hdw->big_lock); do {
142 if (cptr->info->type == pvr2_ctl_int) { 142 if (cptr->info->type == pvr2_ctl_int) {
143 ret = cptr->info->default_value; 143 if (cptr->info->get_def_value) {
144 ret = cptr->info->get_def_value(cptr, valptr);
145 } else {
146 *valptr = cptr->info->default_value;
147 }
144 } 148 }
145 } while(0); LOCK_GIVE(cptr->hdw->big_lock); 149 } while(0); LOCK_GIVE(cptr->hdw->big_lock);
146 return ret; 150 return ret;