From 122f8ca9fc2a1fb872708d4135f09d68585e7f0c Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Fri, 24 Oct 2008 18:08:28 +0000 Subject: Minor fixes to the saa7110 driver From: Jean Delvare * Apparently the author of the saa7110 driver was confused by the number of outputs returned by DECODER_GET_CAPABILITIES. Of course a decoder chip has no analog ouputs, but it must have at least one digital output. * Fix an off-by-one error when checking the input value of DECODER_SET_INPUT. Signed-off-by: Jean Delvare Signed-off-by: Mauro Carvalho Chehab --- linux/drivers/media/video/saa7110.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'linux/drivers/media') diff --git a/linux/drivers/media/video/saa7110.c b/linux/drivers/media/video/saa7110.c index 15eb8bd7a..b7afe3124 100644 --- a/linux/drivers/media/video/saa7110.c +++ b/linux/drivers/media/video/saa7110.c @@ -48,7 +48,7 @@ module_param(debug, int, 0); MODULE_PARM_DESC(debug, "Debug level (0-1)"); #define SAA7110_MAX_INPUT 9 /* 6 CVBS, 3 SVHS */ -#define SAA7110_MAX_OUTPUT 0 /* its a decoder only */ +#define SAA7110_MAX_OUTPUT 1 /* 1 YUV */ #define SAA7110_NR_REG 0x35 @@ -328,7 +328,7 @@ saa7110_command (struct i2c_client *client, case DECODER_SET_INPUT: v = *(int *) arg; - if (v < 0 || v > SAA7110_MAX_INPUT) { + if (v < 0 || v >= SAA7110_MAX_INPUT) { v4l_dbg(1, debug, client, "input=%d not available\n", v); return -EINVAL; } -- cgit v1.2.3