if (!err) i2c_camera_command(DECODER_INDYCAM_SET_CONTROLS, &indycam_ctrl); break; case VINO_INPUT_COMPOSITE: case VINO_INPUT_SVIDEO: 
static int vino_v4l2_s_ctrl(struct vino_channel_settings *vcs,			    struct v4l2_control *control){	struct indycam_control indycam_ctrl;	struct saa7191_control saa7191_ctrl;	int i;	int err = 0;	spin_lock(&vino_drvdata->input_lock);	switch (vcs->input) {	case VINO_INPUT_D1:		for (i = 0; i < VINO_INDYCAM_V4L2_CONTROL_COUNT; i++) {			if (vino_indycam_v4l2_controls[i].id ==			    control->id) {				if ((control->value >=				     vino_indycam_v4l2_controls[i].minimum)				    && (control->value <=					vino_indycam_v4l2_controls[i].					maximum)) {					goto ok1;				} else {					err = -ERANGE;					goto error;				}			}		}		err = -EINVAL;		goto error;ok1:		indycam_ctrl.agc = INDYCAM_VALUE_UNCHANGED;		indycam_ctrl.awb = INDYCAM_VALUE_UNCHANGED;		indycam_ctrl.shutter = INDYCAM_VALUE_UNCHANGED;		indycam_ctrl.gain = INDYCAM_VALUE_UNCHANGED;		indycam_ctrl.red_balance = INDYCAM_VALUE_UNCHANGED;		indycam_ctrl.blue_balance = INDYCAM_VALUE_UNCHANGED;		indycam_ctrl.red_saturation = INDYCAM_VALUE_UNCHANGED;		indycam_ctrl.blue_saturation = INDYCAM_VALUE_UNCHANGED;		indycam_ctrl.gamma = INDYCAM_VALUE_UNCHANGED;		switch(control->id) {		case V4L2_CID_AUTOGAIN:			indycam_ctrl.agc = control->value;			break;		case V4L2_CID_AUTO_WHITE_BALANCE:			indycam_ctrl.awb = control->value;			break;		case V4L2_CID_GAIN:			indycam_ctrl.gain = control->value;			break;		case V4L2_CID_PRIVATE_BASE:			indycam_ctrl.red_saturation = control->value;			break;		case V4L2_CID_PRIVATE_BASE + 1:			indycam_ctrl.blue_saturation = control->value;			break;		case V4L2_CID_RED_BALANCE:			indycam_ctrl.red_balance = control->value;			break;		case V4L2_CID_BLUE_BALANCE:			indycam_ctrl.blue_balance = control->value;			break;		case V4L2_CID_EXPOSURE:			indycam_ctrl.shutter = control->value;			break;		case V4L2_CID_GAMMA:			indycam_ctrl.gamma = control->value;			break;		default:			err =  -EINVAL;		}		if (!err)			i2c_camera_command(DECODER_INDYCAM_SET_CONTROLS,					   &indycam_ctrl);		break;	case VINO_INPUT_COMPOSITE:	case VINO_INPUT_SVIDEO:		for (i = 0; i < VINO_SAA7191_V4L2_CONTROL_COUNT; i++) {			if (vino_saa7191_v4l2_controls[i].id ==			    control->id) {				if ((control->value >=				     vino_saa7191_v4l2_controls[i].minimum)				    && (control->value <=					vino_saa7191_v4l2_controls[i].					maximum)) {					goto ok2;				} else {					err = -ERANGE;					goto error;				}			}		}		err = -EINVAL;		goto error;ok2:		saa7191_ctrl.hue = SAA7191_VALUE_UNCHANGED;		saa7191_ctrl.vtrc = SAA7191_VALUE_UNCHANGED;		switch(control->id) {		case V4L2_CID_HUE:			saa7191_ctrl.hue = control->value;			break;		case V4L2_CID_PRIVATE_BASE:			saa7191_ctrl.vtrc = control->value;			break;		default:			err =  -EINVAL;		}		if (!err)			i2c_decoder_command(DECODER_SAA7191_SET_CONTROLS,					    &saa7191_ctrl);		break;	default:		err =  -EINVAL;	}error:	spin_unlock(&vino_drvdata->input_lock);	return err;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/a637a114f36b94a1ad8b9867f43bac0414958420/vino.c/buggy/drivers/media/video/vino.c