Google
  Web www.spinics.net

[PATCH] Minor fixes to the saa7110 driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


* 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 <khali@xxxxxxxxxxxx>
---
 drivers/media/video/saa7110.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- linux-2.6.28-rc1.orig/drivers/media/video/saa7110.c	2008-10-24 09:28:04.000000000 +0200
+++ linux-2.6.28-rc1/drivers/media/video/saa7110.c	2008-10-24 17:00:53.000000000 +0200
@@ -47,7 +47,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
 
@@ -327,7 +327,7 @@ saa7110_command (struct i2c_client *clie
 
 	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;
 		}


-- 
Jean Delvare

_______________________________________________
v4l-dvb-maintainer mailing list
v4l-dvb-maintainer@xxxxxxxxxxx
http://www.linuxtv.org/cgi-bin/mailman/listinfo/v4l-dvb-maintainer

[Linux Media]     [Older V4L]     [Linux DVB]     [Video Disk Recorder]     [Asterisk]     [Photo]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Free Photo Albums]     [Fedora Users]     [Fedora Women]     [ALSA Users]     [ALSA Devel]     [SSH]     [Linux USB]

-->
Add to Google Powered by Linux

Google PageRank Checking tool