case VIDEO_MODE_PAL: 
decoder->input = *iarg; tvp5150_selmux(client, decoder->input);  
static int tvp5150_command(struct i2c_client *client,			   unsigned int cmd, void *arg){	struct tvp5150 *decoder = i2c_get_clientdata(client);	switch (cmd) {	case 0:	case DECODER_INIT:		tvp5150_reset(client);		break;	case DECODER_DUMP:		dump_reg(client);		break;	case DECODER_GET_CAPABILITIES:	{		struct video_decoder_capability *cap = arg;		cap->flags = VIDEO_DECODER_PAL |		    VIDEO_DECODER_NTSC |		    VIDEO_DECODER_SECAM |		    VIDEO_DECODER_AUTO | VIDEO_DECODER_CCIR;		cap->inputs = 3;		cap->outputs = 1;		break;	}	case DECODER_GET_STATUS:	{		break;	}	case DECODER_SET_GPIO:		break;	case DECODER_SET_VBI_BYPASS:		break;	case DECODER_SET_NORM:	{		int *iarg = arg;		switch (*iarg) {		case VIDEO_MODE_NTSC:			break;		case VIDEO_MODE_PAL:			break;		case VIDEO_MODE_SECAM:			break;		case VIDEO_MODE_AUTO:			break;		default:			return -EINVAL;		}		decoder->norm = *iarg;		break;	}	case DECODER_SET_INPUT:	{		int *iarg = arg;		if (*iarg < 0 || *iarg > 3) {			return -EINVAL;		}		decoder->input=*iarg;		tvp5150_selmux(client, decoder->input);		break;	}	case DECODER_SET_OUTPUT:	{		int *iarg = arg;		/* not much choice of outputs */		if (*iarg != 0) {			return -EINVAL;		}		break;	}	case DECODER_ENABLE_OUTPUT:	{		int *iarg = arg;		decoder->enable = (*iarg != 0);		tvp5150_selmux(client, decoder->input);		break;	}	case DECODER_SET_PICTURE:	{		struct video_picture *pic = arg;		if (decoder->bright != pic->brightness) {			/* We want 0 to 255 we get 0-65535 */			decoder->bright = pic->brightness;			tvp5150_write(client, TVP5150_BRIGHT_CTL, decoder->bright >> 8);		}		if (decoder->contrast != pic->contrast) {			/* We want 0 to 255 we get 0-65535 */			decoder->contrast = pic->contrast;			tvp5150_write(client, TVP5150_CONTRAST_CTL, decoder->contrast >> 8);		}		if (decoder->sat != pic->colour) {			/* We want 0 to 255 we get 0-65535 */			decoder->sat = pic->colour;			tvp5150_write(client, TVP5150_SATURATION_CTL, decoder->contrast >> 8);		}		if (decoder->hue != pic->hue) {			/* We want -128 to 127 we get 0-65535 */			decoder->hue = pic->hue;			tvp5150_write(client, TVP5150_HUE_CTL, (decoder->hue - 32768) >> 8);		}		break;	}	default:		return -EINVAL;	}	return 0;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/a6c2ba283565dbc9f055dcb2ecba1971460bb535/tvp5150.c/buggy/drivers/media/video/tvp5150.c