linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/28] V4L/DVB fixes
@ 2006-12-27 16:50 Mauro Carvalho Chehab
  2006-12-27 16:57 ` [PATCH 05/28] V4L/DVB (4960): Removal of unused code from usbvision-i2c.c Mauro Carvalho Chehab
                   ` (27 more replies)
  0 siblings, 28 replies; 29+ messages in thread
From: Mauro Carvalho Chehab @ 2006-12-27 16:50 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: V4L-DVB Maintainers, V4L, Andrew Morton, LKML

Linus,

Please pull 'master' from:
        git://git.kernel.org:/pub/scm/linux/kernel/git/mchehab/v4l-dvb.git master

It fixes some OOPS and compilation troubles on non x86 platforms and some Kconfig
broken dependencies. There are several fixes at the drivers, including some fixes
to support some not so common standards, like PAL/60.
The biggest changes are some required fixes on usbvision. There's no risk of causing
regression, since this driver were just introduced at kernel.

   - Fix autosearch index
   - Put remote-debugging in the right place
   - Fix namespace conflict between w9968cf.c on MIPS
   - Usbvision: possible cleanups
   - Removal of unused code from usbvision-i2c.c
   - VIDEO_PALETTE_YUYV and VIDEO_PALETTE_YUV422 are the same palette
   - Add missing tuner module option pal=60 for PAL-60 support.
   - Add PAL-60 support for cx2584x.
   - Usbvision memory fixes
   - Dvb-core: fix bug in CRC-32 checking on 64-bit systems
   - Dvb-core: fix printk type warning
   - Fixes compilation when CONFIG_V4L1_COMPAT is not selected
   - Fixes bug 7267: PAL/60 is not working
   - Fix broken audio mode handling for line-in in msp3400.
   - Force temporal filter to 0 when scaling to prevent ghosting.
   - LOG_STATUS should show the real temporal filter value.
   - Cx2341x audio_properties is an u16, not u8
   - Cpia2/cpia2_usb.c: fix error-path leak
   - Cafe_ccic.c: fix NULL dereference
   - Fix typo in saa7134-dvb.c
   - Vivi: fix use after free in list_for_each()
   - Vivi: fix kthread_run() error check
   - Msp3400: fix kthread_run error check
   - Bttv: delete duplicated ioremap()
   - Allyesconfig build fixes on some non x86 arch
   - Add two required headers on kernel 2.6.20-rc1
   - Usbvision fix: It was using "&&" instead "&"
   - Cx88: Fix leadtek_eeprom tagging

Cheers,
Mauro.

V4L/DVB development is hosted at http://linuxtv.org
---

 drivers/media/common/ir-functions.c             |    1 
 drivers/media/dvb/dvb-core/dvb_net.c            |    4 -
 drivers/media/dvb/dvb-usb/nova-t-usb2.c         |    4 -
 drivers/media/dvb/frontends/dib3000mc.c         |    2 
 drivers/media/video/Kconfig                     |    2 
 drivers/media/video/bt8xx/bttv-driver.c         |    4 -
 drivers/media/video/cafe_ccic.c                 |    2 
 drivers/media/video/cpia2/cpia2_usb.c           |    4 +
 drivers/media/video/cx2341x.c                   |   21 ++-
 drivers/media/video/cx25840/cx25840-vbi.c       |    9 +
 drivers/media/video/cx88/cx88-cards.c           |    2 
 drivers/media/video/cx88/cx88-core.c            |   35 +++--
 drivers/media/video/cx88/cx88.h                 |    2 
 drivers/media/video/em28xx/em28xx-video.c       |    4 -
 drivers/media/video/meye.c                      |    4 -
 drivers/media/video/msp3400-driver.c            |    8 -
 drivers/media/video/msp3400-kthreads.c          |   11 +-
 drivers/media/video/saa7134/saa7134-dvb.c       |    8 +
 drivers/media/video/tuner-core.c                |    4 +
 drivers/media/video/usbvision/usbvision-cards.c |   11 +-
 drivers/media/video/usbvision/usbvision-core.c  |   83 +++++--------
 drivers/media/video/usbvision/usbvision-i2c.c   |   35 +----
 drivers/media/video/usbvision/usbvision-video.c |  150 ++++++++++++++---------
 drivers/media/video/usbvision/usbvision.h       |   27 ----
 drivers/media/video/vivi.c                      |    8 +
 drivers/media/video/w9966.c                     |    2 
 drivers/media/video/w9968cf.c                   |   24 ++--
 drivers/media/video/zoran_device.c              |    3 
 include/media/cx2341x.h                         |    2 
 include/media/ir-common.h                       |    1 
 30 files changed, 242 insertions(+), 235 deletions(-)


^ permalink raw reply	[flat|nested] 29+ messages in thread

* [PATCH 03/28] V4L/DVB (4958): Fix namespace conflict between w9968cf.c on MIPS
  2006-12-27 16:50 [PATCH 00/28] V4L/DVB fixes Mauro Carvalho Chehab
  2006-12-27 16:57 ` [PATCH 05/28] V4L/DVB (4960): Removal of unused code from usbvision-i2c.c Mauro Carvalho Chehab
  2006-12-27 16:57 ` [PATCH 01/28] V4L/DVB (4955): Fix autosearch index Mauro Carvalho Chehab
@ 2006-12-27 16:57 ` Mauro Carvalho Chehab
  2006-12-27 16:57 ` [PATCH 04/28] V4L/DVB (4959): Usbvision: possible cleanups Mauro Carvalho Chehab
                   ` (24 subsequent siblings)
  27 siblings, 0 replies; 29+ messages in thread
From: Mauro Carvalho Chehab @ 2006-12-27 16:57 UTC (permalink / raw)
  To: LKML
  Cc: V4L-DVB Maintainers, Ralf Baechle, Andrew Morton, Mauro Carvalho Chehab


From: Ralf Baechle <ralf@linux-mips.org>

Both use __SC.  Since __* is sort of private namespace I've choosen to fix
this in the driver.  For consistency I decieded to also change __UNSC to
UNSC.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
---

 drivers/media/video/w9968cf.c |   24 ++++++++++++------------
 1 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/drivers/media/video/w9968cf.c b/drivers/media/video/w9968cf.c
index ddce2fb..9f403af 100644
--- a/drivers/media/video/w9968cf.c
+++ b/drivers/media/video/w9968cf.c
@@ -1827,8 +1827,8 @@ w9968cf_set_window(struct w9968cf_device
 	int err = 0;
 
 	/* Work around to avoid FP arithmetics */
-	#define __SC(x) ((x) << 10)
-	#define __UNSC(x) ((x) >> 10)
+	#define SC(x) ((x) << 10)
+	#define UNSC(x) ((x) >> 10)
 
 	/* Make sure we are using a supported resolution */
 	if ((err = w9968cf_adjust_window_size(cam, (u16*)&win.width,
@@ -1836,15 +1836,15 @@ w9968cf_set_window(struct w9968cf_device
 		goto error;
 
 	/* Scaling factors */
-	fw = __SC(win.width) / cam->maxwidth;
-	fh = __SC(win.height) / cam->maxheight;
+	fw = SC(win.width) / cam->maxwidth;
+	fh = SC(win.height) / cam->maxheight;
 
 	/* Set up the width and height values used by the chip */
 	if ((win.width > cam->maxwidth) || (win.height > cam->maxheight)) {
 		cam->vpp_flag |= VPP_UPSCALE;
 		/* Calculate largest w,h mantaining the same w/h ratio */
-		w = (fw >= fh) ? cam->maxwidth : __SC(win.width)/fh;
-		h = (fw >= fh) ? __SC(win.height)/fw : cam->maxheight;
+		w = (fw >= fh) ? cam->maxwidth : SC(win.width)/fh;
+		h = (fw >= fh) ? SC(win.height)/fw : cam->maxheight;
 		if (w < cam->minwidth) /* just in case */
 			w = cam->minwidth;
 		if (h < cam->minheight) /* just in case */
@@ -1861,8 +1861,8 @@ w9968cf_set_window(struct w9968cf_device
 
 	/* Calculate cropped area manteining the right w/h ratio */
 	if (cam->largeview && !(cam->vpp_flag & VPP_UPSCALE)) {
-		cw = (fw >= fh) ? cam->maxwidth : __SC(win.width)/fh;
-		ch = (fw >= fh) ? __SC(win.height)/fw : cam->maxheight;
+		cw = (fw >= fh) ? cam->maxwidth : SC(win.width)/fh;
+		ch = (fw >= fh) ? SC(win.height)/fw : cam->maxheight;
 	} else {
 		cw = w;
 		ch = h;
@@ -1901,8 +1901,8 @@ w9968cf_set_window(struct w9968cf_device
 	/* We have to scale win.x and win.y offsets */
 	if ( (cam->largeview && !(cam->vpp_flag & VPP_UPSCALE))
 	     || (cam->vpp_flag & VPP_UPSCALE) ) {
-		ax = __SC(win.x)/fw;
-		ay = __SC(win.y)/fh;
+		ax = SC(win.x)/fw;
+		ay = SC(win.y)/fh;
 	} else {
 		ax = win.x;
 		ay = win.y;
@@ -1917,8 +1917,8 @@ w9968cf_set_window(struct w9968cf_device
 	/* Adjust win.x, win.y */
 	if ( (cam->largeview && !(cam->vpp_flag & VPP_UPSCALE))
 	     || (cam->vpp_flag & VPP_UPSCALE) ) {
-		win.x = __UNSC(ax*fw);
-		win.y = __UNSC(ay*fh);
+		win.x = UNSC(ax*fw);
+		win.y = UNSC(ay*fh);
 	} else {
 		win.x = ax;
 		win.y = ay;


^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [PATCH 05/28] V4L/DVB (4960): Removal of unused code from usbvision-i2c.c
  2006-12-27 16:50 [PATCH 00/28] V4L/DVB fixes Mauro Carvalho Chehab
@ 2006-12-27 16:57 ` Mauro Carvalho Chehab
  2006-12-27 16:57 ` [PATCH 01/28] V4L/DVB (4955): Fix autosearch index Mauro Carvalho Chehab
                   ` (26 subsequent siblings)
  27 siblings, 0 replies; 29+ messages in thread
From: Mauro Carvalho Chehab @ 2006-12-27 16:57 UTC (permalink / raw)
  To: LKML; +Cc: V4L-DVB Maintainers, Mauro Carvalho Chehab


From: Mauro Carvalho Chehab <mchehab@infradead.org>

i2c_adap is almost not used. This patch removes it, cleaning the i2c support,
and improving driver understanding.
Thanks to Thierry Merle for testing it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
---

 drivers/media/video/usbvision/usbvision-i2c.c |   27 ++++---------------------
 drivers/media/video/usbvision/usbvision.h     |   23 ---------------------
 2 files changed, 4 insertions(+), 46 deletions(-)

diff --git a/drivers/media/video/usbvision/usbvision-i2c.c b/drivers/media/video/usbvision/usbvision-i2c.c
index 9540bd0..efcd25b 100644
--- a/drivers/media/video/usbvision/usbvision-i2c.c
+++ b/drivers/media/video/usbvision/usbvision-i2c.c
@@ -58,7 +58,6 @@ static int usbvision_i2c_read(void *data
 static inline int try_write_address(struct i2c_adapter *i2c_adap,
 				    unsigned char addr, int retries)
 {
-	struct i2c_algo_usb_data *adap = i2c_adap->algo_data;
 	void *data;
 	int i, ret = -1;
 	char buf[4];
@@ -69,10 +68,10 @@ static inline int try_write_address(stru
 		ret = (usbvision_i2c_write(data, addr, buf, 1));
 		if (ret == 1)
 			break;	/* success! */
-		udelay(5 /*adap->udelay */ );
+		udelay(5);
 		if (i == retries)	/* no success */
 			break;
-		udelay(adap->udelay);
+		udelay(10);
 	}
 	if (i) {
 		PDEBUG(DBG_ALGO,"Needed %d retries for address %#2x", i, addr);
@@ -84,7 +83,6 @@ static inline int try_write_address(stru
 static inline int try_read_address(struct i2c_adapter *i2c_adap,
 				   unsigned char addr, int retries)
 {
-	struct i2c_algo_usb_data *adap = i2c_adap->algo_data;
 	void *data;
 	int i, ret = -1;
 	char buf[4];
@@ -94,10 +92,10 @@ static inline int try_read_address(struc
 		ret = (usbvision_i2c_read(data, addr, buf, 1));
 		if (ret == 1)
 			break;	/* success! */
-		udelay(5 /*adap->udelay */ );
+		udelay(5);
 		if (i == retries)	/* no success */
 			break;
-		udelay(adap->udelay);
+		udelay(10);
 	}
 	if (i) {
 		PDEBUG(DBG_ALGO,"Needed %d retries for address %#2x", i, addr);
@@ -248,15 +246,12 @@ int usbvision_i2c_usb_del_bus(struct i2c
 /* usbvision specific I2C functions                                        */
 /* ----------------------------------------------------------------------- */
 static struct i2c_adapter i2c_adap_template;
-static struct i2c_algo_usb_data i2c_algo_template;
 static struct i2c_client i2c_client_template;
 
 int usbvision_init_i2c(struct usb_usbvision *usbvision)
 {
 	memcpy(&usbvision->i2c_adap, &i2c_adap_template,
 	       sizeof(struct i2c_adapter));
-	memcpy(&usbvision->i2c_algo, &i2c_algo_template,
-	       sizeof(struct i2c_algo_usb_data));
 	memcpy(&usbvision->i2c_client, &i2c_client_template,
 	       sizeof(struct i2c_client));
 
@@ -266,9 +261,7 @@ int usbvision_init_i2c(struct usb_usbvis
 
 	i2c_set_adapdata(&usbvision->i2c_adap, usbvision);
 	i2c_set_clientdata(&usbvision->i2c_client, usbvision);
-	i2c_set_algo_usb_data(&usbvision->i2c_algo, usbvision);
 
-	usbvision->i2c_adap.algo_data = &usbvision->i2c_algo;
 	usbvision->i2c_client.adapter = &usbvision->i2c_adap;
 
 	if (usbvision_write_reg(usbvision, USBVISION_SER_MODE, USBVISION_IIC_LRNACK) < 0) {
@@ -297,7 +290,6 @@ #endif
 void call_i2c_clients(struct usb_usbvision *usbvision, unsigned int cmd,
 		      void *arg)
 {
-	BUG_ON(NULL == usbvision->i2c_adap.algo_data);
 	i2c_clients_command(&usbvision->i2c_adap, cmd, arg);
 }
 
@@ -531,21 +523,10 @@ static int usbvision_i2c_read(void *data
 	return rdcount;
 }
 
-static struct i2c_algo_usb_data i2c_algo_template = {
-	.data		= NULL,
-	.inb		= usbvision_i2c_read,
-	.outb		= usbvision_i2c_write,
-	.udelay		= 10,
-	.mdelay		= 10,
-	.timeout	= 100,
-};
-
 static struct i2c_adapter i2c_adap_template = {
 	.owner = THIS_MODULE,
 	.name              = "usbvision",
 	.id                = I2C_HW_B_BT848, /* FIXME */
-	.algo              = NULL,
-	.algo_data         = NULL,
 	.client_register   = attach_inform,
 	.client_unregister = detach_inform,
 #ifdef I2C_ADAP_CLASS_TV_ANALOG
diff --git a/drivers/media/video/usbvision/usbvision.h b/drivers/media/video/usbvision/usbvision.h
index 5ad07f8..b1645f9 100644
--- a/drivers/media/video/usbvision/usbvision.h
+++ b/drivers/media/video/usbvision/usbvision.h
@@ -219,18 +219,6 @@ #define USBVISION_IS_OPERATIONAL(udevice
 	((udevice)->last_error == 0) && \
 	(!(udevice)->remove_pending))
 
-/* I2C structures */
-struct i2c_algo_usb_data {
-	void *data;		/* private data for lowlevel routines */
-	int (*inb) (void *data, unsigned char addr, char *buf, short len);
-	int (*outb) (void *data, unsigned char addr, char *buf, short len);
-
-	/* local settings */
-	int udelay;
-	int mdelay;
-	int timeout;
-};
-
 #define I2C_USB_ADAP_MAX	16
 
 /* ----------------------------------------------------------------- */
@@ -383,7 +371,6 @@ struct usb_usbvision {
 
 	/* i2c Declaration Section*/
 	struct i2c_adapter i2c_adap;
-	struct i2c_algo_usb_data i2c_algo;
 	struct i2c_client i2c_client;
 
 	struct urb *ctrlUrb;
@@ -491,16 +478,6 @@ struct usb_usbvision {
 
 int usbvision_i2c_usb_del_bus(struct i2c_adapter *);
 
-static inline void *i2c_get_algo_usb_data (struct i2c_algo_usb_data *dev)
-{
-	return dev->data;
-}
-
-static inline void i2c_set_algo_usb_data (struct i2c_algo_usb_data *dev, void *data)
-{
-	dev->data = data;
-}
-
 
 /* ----------------------------------------------------------------------- */
 /* usbvision specific I2C functions                                        */


^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [PATCH 02/28] V4L/DVB (4956): [NOVA-T-USB2] Put remote-debugging in the right place
  2006-12-27 16:50 [PATCH 00/28] V4L/DVB fixes Mauro Carvalho Chehab
                   ` (3 preceding siblings ...)
  2006-12-27 16:57 ` [PATCH 04/28] V4L/DVB (4959): Usbvision: possible cleanups Mauro Carvalho Chehab
@ 2006-12-27 16:57 ` Mauro Carvalho Chehab
  2006-12-27 16:57 ` [PATCH 08/28] V4L/DVB (4968): Add PAL-60 support for cx2584x Mauro Carvalho Chehab
                   ` (22 subsequent siblings)
  27 siblings, 0 replies; 29+ messages in thread
From: Mauro Carvalho Chehab @ 2006-12-27 16:57 UTC (permalink / raw)
  To: LKML
  Cc: V4L-DVB Maintainers, Mario Rossi, Patrick Boettcher,
	Mauro Carvalho Chehab


From: Mario Rossi <mariofutire@googlemail.com>

This patch removes unnecessary (and misleading) debug
output (it printed the values of the keys in the table up to the value
of the key pressed).

Signed-off-by: Mario Rossi <mariofutire@googlemail.com>
Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
---

 drivers/media/dvb/dvb-usb/nova-t-usb2.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/media/dvb/dvb-usb/nova-t-usb2.c b/drivers/media/dvb/dvb-usb/nova-t-usb2.c
index d48622e..badc468 100644
--- a/drivers/media/dvb/dvb-usb/nova-t-usb2.c
+++ b/drivers/media/dvb/dvb-usb/nova-t-usb2.c
@@ -90,9 +90,11 @@ static int nova_t_rc_query(struct dvb_us
 			deb_rc("raw key code 0x%02x, 0x%02x, 0x%02x to c: %02x d: %02x toggle: %d\n",key[1],key[2],key[3],custom,data,toggle);
 
 			for (i = 0; i < ARRAY_SIZE(haupp_rc_keys); i++) {
-				deb_rc("c: %x, d: %x\n",haupp_rc_keys[i].data,haupp_rc_keys[i].custom);
 				if (haupp_rc_keys[i].data == data &&
 					haupp_rc_keys[i].custom == custom) {
+
+					deb_rc("c: %x, d: %x\n",haupp_rc_keys[i].data,haupp_rc_keys[i].custom);
+
 					*event = haupp_rc_keys[i].event;
 					*state = REMOTE_KEY_PRESSED;
 					if (st->old_toggle == toggle) {


^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [PATCH 04/28] V4L/DVB (4959): Usbvision: possible cleanups
  2006-12-27 16:50 [PATCH 00/28] V4L/DVB fixes Mauro Carvalho Chehab
                   ` (2 preceding siblings ...)
  2006-12-27 16:57 ` [PATCH 03/28] V4L/DVB (4958): Fix namespace conflict between w9968cf.c on MIPS Mauro Carvalho Chehab
@ 2006-12-27 16:57 ` Mauro Carvalho Chehab
  2006-12-27 16:57 ` [PATCH 02/28] V4L/DVB (4956): [NOVA-T-USB2] Put remote-debugging in the right place Mauro Carvalho Chehab
                   ` (23 subsequent siblings)
  27 siblings, 0 replies; 29+ messages in thread
From: Mauro Carvalho Chehab @ 2006-12-27 16:57 UTC (permalink / raw)
  To: LKML; +Cc: V4L-DVB Maintainers, Adrian Bunk, Mauro Carvalho Chehab


From: Adrian Bunk <bunk@stusta.de>

This patch contains the following possible cleanups:
- make needlessly global functions static
- remove the unused EXPORT_SYMBOL's

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
---

 drivers/media/video/usbvision/usbvision-core.c  |   33 +++++++++++++----------
 drivers/media/video/usbvision/usbvision-i2c.c   |    5 +--
 drivers/media/video/usbvision/usbvision-video.c |    2 +
 drivers/media/video/usbvision/usbvision.h       |    2 -
 4 files changed, 21 insertions(+), 21 deletions(-)

diff --git a/drivers/media/video/usbvision/usbvision-core.c b/drivers/media/video/usbvision/usbvision-core.c
index 797b97b..6126873 100644
--- a/drivers/media/video/usbvision/usbvision-core.c
+++ b/drivers/media/video/usbvision/usbvision-core.c
@@ -118,7 +118,7 @@ static int usbvision_measure_bandwidth (
  * This is used when initializing the contents of the area.
  */
 
-void *usbvision_rvmalloc(unsigned long size)
+static void *usbvision_rvmalloc(unsigned long size)
 {
 	void *mem;
 	unsigned long adr;
@@ -181,7 +181,7 @@ #endif
 /********************************
  * scratch ring buffer handling
  ********************************/
-int scratch_len(struct usb_usbvision *usbvision)    /*This returns the amount of data actually in the buffer */
+static int scratch_len(struct usb_usbvision *usbvision)    /*This returns the amount of data actually in the buffer */
 {
 	int len = usbvision->scratch_write_ptr - usbvision->scratch_read_ptr;
 	if (len < 0) {
@@ -194,7 +194,7 @@ int scratch_len(struct usb_usbvision *us
 
 
 /* This returns the free space left in the buffer */
-int scratch_free(struct usb_usbvision *usbvision)
+static int scratch_free(struct usb_usbvision *usbvision)
 {
 	int free = usbvision->scratch_read_ptr - usbvision->scratch_write_ptr;
 	if (free <= 0) {
@@ -211,7 +211,8 @@ int scratch_free(struct usb_usbvision *u
 
 
 /* This puts data into the buffer */
-int scratch_put(struct usb_usbvision *usbvision, unsigned char *data, int len)
+static int scratch_put(struct usb_usbvision *usbvision, unsigned char *data,
+		       int len)
 {
 	int len_part;
 
@@ -237,7 +238,7 @@ int scratch_put(struct usb_usbvision *us
 }
 
 /* This marks the write_ptr as position of new frame header */
-void scratch_mark_header(struct usb_usbvision *usbvision)
+static void scratch_mark_header(struct usb_usbvision *usbvision)
 {
 	PDEBUG(DBG_SCRATCH, "header at write_ptr=%d\n", usbvision->scratch_headermarker_write_ptr);
 
@@ -248,7 +249,8 @@ void scratch_mark_header(struct usb_usbv
 }
 
 /* This gets data from the buffer at the given "ptr" position */
-int scratch_get_extra(struct usb_usbvision *usbvision, unsigned char *data, int *ptr, int len)
+static int scratch_get_extra(struct usb_usbvision *usbvision,
+			     unsigned char *data, int *ptr, int len)
 {
 	int len_part;
 	if (*ptr + len < scratch_buf_size) {
@@ -274,7 +276,8 @@ int scratch_get_extra(struct usb_usbvisi
 
 
 /* This sets the scratch extra read pointer */
-void scratch_set_extra_ptr(struct usb_usbvision *usbvision, int *ptr, int len)
+static void scratch_set_extra_ptr(struct usb_usbvision *usbvision, int *ptr,
+				  int len)
 {
 	*ptr = (usbvision->scratch_read_ptr + len)%scratch_buf_size;
 
@@ -283,7 +286,7 @@ void scratch_set_extra_ptr(struct usb_us
 
 
 /*This increments the scratch extra read pointer */
-void scratch_inc_extra_ptr(int *ptr, int len)
+static void scratch_inc_extra_ptr(int *ptr, int len)
 {
 	*ptr = (*ptr + len) % scratch_buf_size;
 
@@ -292,7 +295,8 @@ void scratch_inc_extra_ptr(int *ptr, int
 
 
 /* This gets data from the buffer */
-int scratch_get(struct usb_usbvision *usbvision, unsigned char *data, int len)
+static int scratch_get(struct usb_usbvision *usbvision, unsigned char *data,
+		       int len)
 {
 	int len_part;
 	if (usbvision->scratch_read_ptr + len < scratch_buf_size) {
@@ -318,7 +322,8 @@ int scratch_get(struct usb_usbvision *us
 
 
 /* This sets read pointer to next header and returns it */
-int scratch_get_header(struct usb_usbvision *usbvision,struct usbvision_frame_header *header)
+static int scratch_get_header(struct usb_usbvision *usbvision,
+			      struct usbvision_frame_header *header)
 {
 	int errCode = 0;
 
@@ -346,7 +351,7 @@ int scratch_get_header(struct usb_usbvis
 
 
 /*This removes len bytes of old data from the buffer */
-void scratch_rm_old(struct usb_usbvision *usbvision, int len)
+static void scratch_rm_old(struct usb_usbvision *usbvision, int len)
 {
 
 	usbvision->scratch_read_ptr += len;
@@ -356,7 +361,7 @@ void scratch_rm_old(struct usb_usbvision
 
 
 /*This resets the buffer - kills all data in it too */
-void scratch_reset(struct usb_usbvision *usbvision)
+static void scratch_reset(struct usb_usbvision *usbvision)
 {
 	PDEBUG(DBG_SCRATCH, "\n");
 
@@ -399,8 +404,8 @@ void usbvision_scratch_free(struct usb_u
  *		1: Draw a colored grid
  *
  */
-void usbvision_testpattern(struct usb_usbvision *usbvision, int fullframe,
-			int pmode)
+static void usbvision_testpattern(struct usb_usbvision *usbvision,
+				  int fullframe, int pmode)
 {
 	static const char proc[] = "usbvision_testpattern";
 	struct usbvision_frame *frame;
diff --git a/drivers/media/video/usbvision/usbvision-i2c.c b/drivers/media/video/usbvision/usbvision-i2c.c
index 0f3fba7..9540bd0 100644
--- a/drivers/media/video/usbvision/usbvision-i2c.c
+++ b/drivers/media/video/usbvision/usbvision-i2c.c
@@ -213,7 +213,7 @@ static struct i2c_algorithm i2c_usb_algo
 /*
  * registering functions to load algorithms at runtime
  */
-int usbvision_i2c_usb_add_bus(struct i2c_adapter *adap)
+static int usbvision_i2c_usb_add_bus(struct i2c_adapter *adap)
 {
 	PDEBUG(DBG_I2C, "I2C   debugging is enabled [i2c]");
 	PDEBUG(DBG_ALGO, "ALGO   debugging is enabled [i2c]");
@@ -559,9 +559,6 @@ static struct i2c_client i2c_client_temp
 	.name		= "usbvision internal",
 };
 
-EXPORT_SYMBOL(usbvision_i2c_usb_add_bus);
-EXPORT_SYMBOL(usbvision_i2c_usb_del_bus);
-
 /*
  * Overrides for Emacs so that we follow Linus's tabbing style.
  * ---------------------------------------------------------------------------
diff --git a/drivers/media/video/usbvision/usbvision-video.c b/drivers/media/video/usbvision/usbvision-video.c
index 864446c..b77e25e 100644
--- a/drivers/media/video/usbvision/usbvision-video.c
+++ b/drivers/media/video/usbvision/usbvision-video.c
@@ -1884,7 +1884,7 @@ static struct usb_driver usbvision_drive
  * This procedure preprocesses CustomDevice parameter if any
  *
  */
-void customdevice_process(void)
+static void customdevice_process(void)
 {
 	usbvision_device_data[0]=usbvision_device_data[1];
 	usbvision_table[0]=usbvision_table[1];
diff --git a/drivers/media/video/usbvision/usbvision.h b/drivers/media/video/usbvision/usbvision.h
index 0e7e3d6..5ad07f8 100644
--- a/drivers/media/video/usbvision/usbvision.h
+++ b/drivers/media/video/usbvision/usbvision.h
@@ -489,7 +489,6 @@ struct usb_usbvision {
 /* i2c-algo-usb declaration                                        */
 /* --------------------------------------------------------------- */
 
-int usbvision_i2c_usb_add_bus(struct i2c_adapter *);
 int usbvision_i2c_usb_del_bus(struct i2c_adapter *);
 
 static inline void *i2c_get_algo_usb_data (struct i2c_algo_usb_data *dev)
@@ -510,7 +509,6 @@ int usbvision_init_i2c(struct usb_usbvis
 void call_i2c_clients(struct usb_usbvision *usbvision, unsigned int cmd,void *arg);
 
 /* defined in usbvision-core.c                                      */
-void *usbvision_rvmalloc(unsigned long size);
 void usbvision_rvfree(void *mem, unsigned long size);
 int usbvision_read_reg(struct usb_usbvision *usbvision, unsigned char reg);
 int usbvision_write_reg(struct usb_usbvision *usbvision, unsigned char reg,


^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [PATCH 01/28] V4L/DVB (4955): Fix autosearch index
  2006-12-27 16:50 [PATCH 00/28] V4L/DVB fixes Mauro Carvalho Chehab
  2006-12-27 16:57 ` [PATCH 05/28] V4L/DVB (4960): Removal of unused code from usbvision-i2c.c Mauro Carvalho Chehab
@ 2006-12-27 16:57 ` Mauro Carvalho Chehab
  2006-12-27 16:57 ` [PATCH 03/28] V4L/DVB (4958): Fix namespace conflict between w9968cf.c on MIPS Mauro Carvalho Chehab
                   ` (25 subsequent siblings)
  27 siblings, 0 replies; 29+ messages in thread
From: Mauro Carvalho Chehab @ 2006-12-27 16:57 UTC (permalink / raw)
  To: LKML
  Cc: V4L-DVB Maintainers, Mario Rossi, Patrick Boettcher,
	Mauro Carvalho Chehab


From: Mario Rossi <mariofutire@googlemail.com>

After rewriting the driver the wrong autosearch index was used when
COFDM-parameter needed to be detected.
Thanks to Mario Rossi who found it.

Signed-off-by: Mario Rossi <mariofutire@googlemail.com>
Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
---

 drivers/media/dvb/frontends/dib3000mc.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/media/dvb/frontends/dib3000mc.c b/drivers/media/dvb/frontends/dib3000mc.c
index 5da6617..23aa75a 100644
--- a/drivers/media/dvb/frontends/dib3000mc.c
+++ b/drivers/media/dvb/frontends/dib3000mc.c
@@ -515,7 +515,7 @@ static int dib3000mc_autosearch_start(st
 	fchan.vit_alpha = 1; fchan.vit_code_rate_hp = 2; fchan.vit_code_rate_lp = 2;
 	fchan.vit_hrch = 0; fchan.vit_select_hp = 1;
 
-	dib3000mc_set_channel_cfg(state, &fchan, 7);
+	dib3000mc_set_channel_cfg(state, &fchan, 11);
 
 	reg = dib3000mc_read_word(state, 0);
 	dib3000mc_write_word(state, 0, reg | (1 << 8));


^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [PATCH 06/28] V4L/DVB (4964): VIDEO_PALETTE_YUYV and VIDEO_PALETTE_YUV422 are the same palette
  2006-12-27 16:50 [PATCH 00/28] V4L/DVB fixes Mauro Carvalho Chehab
                   ` (5 preceding siblings ...)
  2006-12-27 16:57 ` [PATCH 08/28] V4L/DVB (4968): Add PAL-60 support for cx2584x Mauro Carvalho Chehab
@ 2006-12-27 16:57 ` Mauro Carvalho Chehab
  2006-12-27 16:57 ` [PATCH 09/28] V4L/DVB (4970): Usbvision memory fixes Mauro Carvalho Chehab
                   ` (20 subsequent siblings)
  27 siblings, 0 replies; 29+ messages in thread
From: Mauro Carvalho Chehab @ 2006-12-27 16:57 UTC (permalink / raw)
  To: LKML; +Cc: V4L-DVB Maintainers, audetto, Mauro Carvalho Chehab


From: audetto@tiscali.it <audetto@tiscali.it>

Consistent handling of VIDEO_PALETTE_YUYV and VIDEO_PALETTE_YUV422

Signed-off-by: Andrea A Odetti <audetto@tiscali.it>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
---

 drivers/media/video/meye.c         |    4 ++--
 drivers/media/video/w9966.c        |    2 +-
 drivers/media/video/zoran_device.c |    3 ++-
 3 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/media/video/meye.c b/drivers/media/video/meye.c
index b083338..616a35d 100644
--- a/drivers/media/video/meye.c
+++ b/drivers/media/video/meye.c
@@ -923,7 +923,7 @@ static int meye_do_ioctl(struct inode *i
 		struct video_picture *p = arg;
 		if (p->depth != 16)
 			return -EINVAL;
-		if (p->palette != VIDEO_PALETTE_YUV422)
+		if (p->palette != VIDEO_PALETTE_YUV422 && p->palette != VIDEO_PALETTE_YUYV)
 			return -EINVAL;
 		mutex_lock(&meye.lock);
 		sonypi_camera_command(SONYPI_COMMAND_SETCAMERABRIGHTNESS,
@@ -978,7 +978,7 @@ static int meye_do_ioctl(struct inode *i
 
 		if (vm->frame >= gbuffers || vm->frame < 0)
 			return -EINVAL;
-		if (vm->format != VIDEO_PALETTE_YUV422)
+		if (vm->format != VIDEO_PALETTE_YUV422 && vm->format != VIDEO_PALETTE_YUYV)
 			return -EINVAL;
 		if (vm->height * vm->width * 2 > gbufsize)
 			return -EINVAL;
diff --git a/drivers/media/video/w9966.c b/drivers/media/video/w9966.c
index 4bdc886..8d14f30 100644
--- a/drivers/media/video/w9966.c
+++ b/drivers/media/video/w9966.c
@@ -789,7 +789,7 @@ static int w9966_v4l_do_ioctl(struct ino
 	case VIDIOCSPICT:
 	{
 		struct video_picture *vpic = arg;
-		if (vpic->depth != 16 || vpic->palette != VIDEO_PALETTE_YUV422)
+		if (vpic->depth != 16 || (vpic->palette != VIDEO_PALETTE_YUV422 && vpic->palette != VIDEO_PALETTE_YUYV))
 			return -EINVAL;
 
 		cam->brightness = vpic->brightness >> 8;
diff --git a/drivers/media/video/zoran_device.c b/drivers/media/video/zoran_device.c
index 168e431..b075276 100644
--- a/drivers/media/video/zoran_device.c
+++ b/drivers/media/video/zoran_device.c
@@ -429,7 +429,7 @@ zr36057_set_vfe (struct zoran           
 	reg |= (HorDcm << ZR36057_VFESPFR_HorDcm);
 	reg |= (VerDcm << ZR36057_VFESPFR_VerDcm);
 	reg |= (DispMode << ZR36057_VFESPFR_DispMode);
-	if (format->palette != VIDEO_PALETTE_YUV422)
+	if (format->palette != VIDEO_PALETTE_YUV422 && format->palette != VIDEO_PALETTE_YUYV)
 		reg |= ZR36057_VFESPFR_LittleEndian;
 	/* RJ: I don't know, why the following has to be the opposite
 	 * of the corresponding ZR36060 setting, but only this way
@@ -441,6 +441,7 @@ zr36057_set_vfe (struct zoran           
 	reg |= ZR36057_VFESPFR_TopField;
 	switch (format->palette) {
 
+	case VIDEO_PALETTE_YUYV:
 	case VIDEO_PALETTE_YUV422:
 		reg |= ZR36057_VFESPFR_YUV422;
 		break;


^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [PATCH 07/28] V4L/DVB (4967): Add missing tuner module option pal=60 for PAL-60 support.
  2006-12-27 16:50 [PATCH 00/28] V4L/DVB fixes Mauro Carvalho Chehab
                   ` (7 preceding siblings ...)
  2006-12-27 16:57 ` [PATCH 09/28] V4L/DVB (4970): Usbvision memory fixes Mauro Carvalho Chehab
@ 2006-12-27 16:57 ` Mauro Carvalho Chehab
  2006-12-27 16:57 ` [PATCH 11/28] V4L/DVB (4973): Dvb-core: fix printk type warning Mauro Carvalho Chehab
                   ` (18 subsequent siblings)
  27 siblings, 0 replies; 29+ messages in thread
From: Mauro Carvalho Chehab @ 2006-12-27 16:57 UTC (permalink / raw)
  To: LKML; +Cc: V4L-DVB Maintainers, Hans Verkuil, Mauro Carvalho Chehab


From: Hans Verkuil <hverkuil@xs4all.nl>

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
---

 drivers/media/video/tuner-core.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/drivers/media/video/tuner-core.c b/drivers/media/video/tuner-core.c
index 705daaa..ee4a493 100644
--- a/drivers/media/video/tuner-core.c
+++ b/drivers/media/video/tuner-core.c
@@ -267,6 +267,10 @@ static int tuner_fixup_std(struct tuner 
 {
 	if ((t->std & V4L2_STD_PAL) == V4L2_STD_PAL) {
 		switch (pal[0]) {
+		case '6':
+			tuner_dbg ("insmod fixup: PAL => PAL-60\n");
+			t->std = V4L2_STD_PAL_60;
+			break;
 		case 'b':
 		case 'B':
 		case 'g':


^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [PATCH 08/28] V4L/DVB (4968): Add PAL-60 support for cx2584x.
  2006-12-27 16:50 [PATCH 00/28] V4L/DVB fixes Mauro Carvalho Chehab
                   ` (4 preceding siblings ...)
  2006-12-27 16:57 ` [PATCH 02/28] V4L/DVB (4956): [NOVA-T-USB2] Put remote-debugging in the right place Mauro Carvalho Chehab
@ 2006-12-27 16:57 ` Mauro Carvalho Chehab
  2006-12-27 16:57 ` [PATCH 06/28] V4L/DVB (4964): VIDEO_PALETTE_YUYV and VIDEO_PALETTE_YUV422 are the same palette Mauro Carvalho Chehab
                   ` (21 subsequent siblings)
  27 siblings, 0 replies; 29+ messages in thread
From: Mauro Carvalho Chehab @ 2006-12-27 16:57 UTC (permalink / raw)
  To: LKML; +Cc: V4L-DVB Maintainers, Hans Verkuil, Mauro Carvalho Chehab


From: Hans Verkuil <hverkuil@xs4all.nl>

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
---

 drivers/media/video/cx25840/cx25840-vbi.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/drivers/media/video/cx25840/cx25840-vbi.c b/drivers/media/video/cx25840/cx25840-vbi.c
index f85f208..ced13fe 100644
--- a/drivers/media/video/cx25840/cx25840-vbi.c
+++ b/drivers/media/video/cx25840/cx25840-vbi.c
@@ -128,7 +128,14 @@ void cx25840_vbi_setup(struct i2c_client
 		uv_lpf=1;
 
 		src_decimation=0x21f;
-		if (std == V4L2_STD_PAL_M) {
+		if (std == V4L2_STD_PAL_60) {
+			vblank=26;
+			vblank656=26;
+			burst=0x5b;
+			luma_lpf=2;
+			comb=0x20;
+			sc=0x0a8263;
+		} else if (std == V4L2_STD_PAL_M) {
 			vblank=20;
 			vblank656=24;
 			burst=0x61;


^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [PATCH 09/28] V4L/DVB (4970): Usbvision memory fixes
  2006-12-27 16:50 [PATCH 00/28] V4L/DVB fixes Mauro Carvalho Chehab
                   ` (6 preceding siblings ...)
  2006-12-27 16:57 ` [PATCH 06/28] V4L/DVB (4964): VIDEO_PALETTE_YUYV and VIDEO_PALETTE_YUV422 are the same palette Mauro Carvalho Chehab
@ 2006-12-27 16:57 ` Mauro Carvalho Chehab
  2006-12-27 16:57 ` [PATCH 07/28] V4L/DVB (4967): Add missing tuner module option pal=60 for PAL-60 support Mauro Carvalho Chehab
                   ` (19 subsequent siblings)
  27 siblings, 0 replies; 29+ messages in thread
From: Mauro Carvalho Chehab @ 2006-12-27 16:57 UTC (permalink / raw)
  To: LKML; +Cc: V4L-DVB Maintainers, Thierry MERLE, Mauro Carvalho Chehab


From: Thierry MERLE <thierry.merle@free.fr>

- fix decompression buffer allocation not done at first driver open
- simplification of USB sbuf allocation (use of usb_buffer_alloc)
- replaced vmalloc by vmalloc_32 (for homogeneity)
- add of saa7111 (i2cAddr=0x48) detection printout in attach_inform

Signed-off-by: Thierry MERLE <thierry.merle@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
---

 drivers/media/video/usbvision/usbvision-core.c  |   48 ++++++-----------------
 drivers/media/video/usbvision/usbvision-i2c.c   |    3 +
 drivers/media/video/usbvision/usbvision-video.c |   14 ++-----
 drivers/media/video/usbvision/usbvision.h       |    2 -
 4 files changed, 19 insertions(+), 48 deletions(-)

diff --git a/drivers/media/video/usbvision/usbvision-core.c b/drivers/media/video/usbvision/usbvision-core.c
index 6126873..68542f2 100644
--- a/drivers/media/video/usbvision/usbvision-core.c
+++ b/drivers/media/video/usbvision/usbvision-core.c
@@ -374,7 +374,7 @@ static void scratch_reset(struct usb_usb
 
 int usbvision_scratch_alloc(struct usb_usbvision *usbvision)
 {
-	usbvision->scratch = vmalloc(scratch_buf_size);
+	usbvision->scratch = vmalloc_32(scratch_buf_size);
 	scratch_reset(usbvision);
 	if(usbvision->scratch == NULL) {
 		err("%s: unable to allocate %d bytes for scratch",
@@ -485,7 +485,7 @@ static void usbvision_testpattern(struct
 int usbvision_decompress_alloc(struct usb_usbvision *usbvision)
 {
 	int IFB_size = MAX_FRAME_WIDTH * MAX_FRAME_HEIGHT * 3 / 2;
-	usbvision->IntraFrameBuffer = vmalloc(IFB_size);
+	usbvision->IntraFrameBuffer = vmalloc_32(IFB_size);
 	if (usbvision->IntraFrameBuffer == NULL) {
 		err("%s: unable to allocate %d for compr. frame buffer", __FUNCTION__, IFB_size);
 		return -ENOMEM;
@@ -2204,6 +2204,7 @@ int usbvision_power_on(struct usb_usbvis
 	usbvision_write_reg(usbvision, USBVISION_PWR_REG, USBVISION_SSPND_EN);
 	usbvision_write_reg(usbvision, USBVISION_PWR_REG,
 			 USBVISION_SSPND_EN | USBVISION_RES2);
+
 	usbvision_write_reg(usbvision, USBVISION_PWR_REG,
 			 USBVISION_SSPND_EN | USBVISION_PWR_VID);
 	errCode = usbvision_write_reg(usbvision, USBVISION_PWR_REG,
@@ -2351,40 +2352,6 @@ int usbvision_setup(struct usb_usbvision
 	return USBVISION_IS_OPERATIONAL(usbvision);
 }
 
-
-int usbvision_sbuf_alloc(struct usb_usbvision *usbvision)
-{
-	int i, errCode = 0;
-	const int sb_size = USBVISION_URB_FRAMES * USBVISION_MAX_ISOC_PACKET_SIZE;
-
-	/* Clean pointers so we know if we allocated something */
-	for (i = 0; i < USBVISION_NUMSBUF; i++)
-		usbvision->sbuf[i].data = NULL;
-
-	for (i = 0; i < USBVISION_NUMSBUF; i++) {
-		usbvision->sbuf[i].data = kzalloc(sb_size, GFP_KERNEL);
-		if (usbvision->sbuf[i].data == NULL) {
-			err("%s: unable to allocate %d bytes for sbuf", __FUNCTION__, sb_size);
-			errCode = -ENOMEM;
-			break;
-		}
-	}
-	return errCode;
-}
-
-
-void usbvision_sbuf_free(struct usb_usbvision *usbvision)
-{
-	int i;
-
-	for (i = 0; i < USBVISION_NUMSBUF; i++) {
-		if (usbvision->sbuf[i].data != NULL) {
-			kfree(usbvision->sbuf[i].data);
-			usbvision->sbuf[i].data = NULL;
-		}
-	}
-}
-
 /*
  * usbvision_init_isoc()
  *
@@ -2393,6 +2360,7 @@ int usbvision_init_isoc(struct usb_usbvi
 {
 	struct usb_device *dev = usbvision->dev;
 	int bufIdx, errCode, regValue;
+	const int sb_size = USBVISION_URB_FRAMES * USBVISION_MAX_ISOC_PACKET_SIZE;
 
 	if (!USBVISION_IS_OPERATIONAL(usbvision))
 		return -EFAULT;
@@ -2428,6 +2396,7 @@ int usbvision_init_isoc(struct usb_usbvi
 			return -ENOMEM;
 		}
 		usbvision->sbuf[bufIdx].urb = urb;
+		usbvision->sbuf[bufIdx].data = usb_buffer_alloc(usbvision->dev, sb_size, GFP_KERNEL,&urb->transfer_dma);
 		urb->dev = dev;
 		urb->context = usbvision;
 		urb->pipe = usb_rcvisocpipe(dev, usbvision->video_endp);
@@ -2469,6 +2438,7 @@ int usbvision_init_isoc(struct usb_usbvi
 void usbvision_stop_isoc(struct usb_usbvision *usbvision)
 {
 	int bufIdx, errCode, regValue;
+	const int sb_size = USBVISION_URB_FRAMES * USBVISION_MAX_ISOC_PACKET_SIZE;
 
 	if ((usbvision->streaming == Stream_Off) || (usbvision->dev == NULL))
 		return;
@@ -2476,6 +2446,12 @@ void usbvision_stop_isoc(struct usb_usbv
 	/* Unschedule all of the iso td's */
 	for (bufIdx = 0; bufIdx < USBVISION_NUMSBUF; bufIdx++) {
 		usb_kill_urb(usbvision->sbuf[bufIdx].urb);
+		if (usbvision->sbuf[bufIdx].data){
+			usb_buffer_free(usbvision->dev,
+					sb_size,
+					usbvision->sbuf[bufIdx].data,
+					usbvision->sbuf[bufIdx].urb->transfer_dma);
+		}
 		usb_free_urb(usbvision->sbuf[bufIdx].urb);
 		usbvision->sbuf[bufIdx].urb = NULL;
 	}
diff --git a/drivers/media/video/usbvision/usbvision-i2c.c b/drivers/media/video/usbvision/usbvision-i2c.c
index efcd25b..858252c 100644
--- a/drivers/media/video/usbvision/usbvision-i2c.c
+++ b/drivers/media/video/usbvision/usbvision-i2c.c
@@ -319,6 +319,9 @@ static int attach_inform(struct i2c_clie
 		case 0x4a:
 			PDEBUG(DBG_I2C,"attach_inform: saa7113 detected.");
 			break;
+		case 0x48:
+			PDEBUG(DBG_I2C,"attach_inform: saa7111 detected.");
+			break;
 		case 0xa0:
 			PDEBUG(DBG_I2C,"attach_inform: eeprom detected.");
 			break;
diff --git a/drivers/media/video/usbvision/usbvision-video.c b/drivers/media/video/usbvision/usbvision-video.c
index b77e25e..31b133e 100644
--- a/drivers/media/video/usbvision/usbvision-video.c
+++ b/drivers/media/video/usbvision/usbvision-video.c
@@ -353,20 +353,15 @@ static int usbvision_v4l2_open(struct in
 		if(!errCode) {
 			/* Allocate memory for the scratch ring buffer */
 			errCode = usbvision_scratch_alloc(usbvision);
-			if(!errCode) {
-				/* Allocate memory for the USB S buffers */
-				errCode = usbvision_sbuf_alloc(usbvision);
-				if ((!errCode) && (usbvision->isocMode==ISOC_MODE_COMPRESS)) {
-					/* Allocate intermediate decompression buffers only if needed */
-					errCode = usbvision_decompress_alloc(usbvision);
-				}
+			if ((!errCode) && (isocMode==ISOC_MODE_COMPRESS)) {
+				/* Allocate intermediate decompression buffers only if needed */
+				errCode = usbvision_decompress_alloc(usbvision);
 			}
 		}
 		if (errCode) {
 			/* Deallocate all buffers if trouble */
 			usbvision_frames_free(usbvision);
 			usbvision_scratch_free(usbvision);
-			usbvision_sbuf_free(usbvision);
 			usbvision_decompress_free(usbvision);
 		}
 	}
@@ -437,9 +432,8 @@ static int usbvision_v4l2_close(struct i
 	usbvision_stop_isoc(usbvision);
 
 	usbvision_decompress_free(usbvision);
-	usbvision_rvfree(usbvision->fbuf, usbvision->fbuf_size);
+	usbvision_frames_free(usbvision);
 	usbvision_scratch_free(usbvision);
-	usbvision_sbuf_free(usbvision);
 
 	usbvision->user--;
 
diff --git a/drivers/media/video/usbvision/usbvision.h b/drivers/media/video/usbvision/usbvision.h
index b1645f9..e2bcaba 100644
--- a/drivers/media/video/usbvision/usbvision.h
+++ b/drivers/media/video/usbvision/usbvision.h
@@ -495,8 +495,6 @@ int usbvision_frames_alloc(struct usb_us
 void usbvision_frames_free(struct usb_usbvision *usbvision);
 int usbvision_scratch_alloc(struct usb_usbvision *usbvision);
 void usbvision_scratch_free(struct usb_usbvision *usbvision);
-int usbvision_sbuf_alloc(struct usb_usbvision *usbvision);
-void usbvision_sbuf_free(struct usb_usbvision *usbvision);
 int usbvision_decompress_alloc(struct usb_usbvision *usbvision);
 void usbvision_decompress_free(struct usb_usbvision *usbvision);
 


^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [PATCH 13/28] V4L/DVB (4980): Fixes bug 7267: PAL/60 is not working
  2006-12-27 16:50 [PATCH 00/28] V4L/DVB fixes Mauro Carvalho Chehab
                   ` (9 preceding siblings ...)
  2006-12-27 16:57 ` [PATCH 11/28] V4L/DVB (4973): Dvb-core: fix printk type warning Mauro Carvalho Chehab
@ 2006-12-27 16:57 ` Mauro Carvalho Chehab
  2006-12-27 16:57 ` [PATCH 12/28] V4L/DVB (4979): Fixes compilation when CONFIG_V4L1_COMPAT is not selected Mauro Carvalho Chehab
                   ` (16 subsequent siblings)
  27 siblings, 0 replies; 29+ messages in thread
From: Mauro Carvalho Chehab @ 2006-12-27 16:57 UTC (permalink / raw)
  To: LKML; +Cc: V4L-DVB Maintainers, Mauro Carvalho Chehab


From: Mauro Carvalho Chehab <mchehab@infradead.org>

On cx88 driver, sampling rate should be at chroma subcarrier freq (FSC).
However, driver were programming wrong values for PAL/60, PAL/Nc and
NTSC 4.43. This patch do the proper calculation. It also calculates
htotal, hdelay and hactive constants, according with the sampling
rate.
It is tested with PAL/60 by Piotr Maksymuk and Olivier. Also tested with
the already-supported standards.

Test is still required for PAL/Nc.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
---

 drivers/media/video/cx88/cx88-core.c |   35 +++++++++++++++++++++-------------
 drivers/media/video/cx88/cx88.h      |    2 +-
 2 files changed, 23 insertions(+), 14 deletions(-)

diff --git a/drivers/media/video/cx88/cx88-core.c b/drivers/media/video/cx88/cx88-core.c
index 453af5e..1899736 100644
--- a/drivers/media/video/cx88/cx88-core.c
+++ b/drivers/media/video/cx88/cx88-core.c
@@ -633,12 +633,12 @@ int cx88_reset(struct cx88_core *core)
 
 static unsigned int inline norm_swidth(struct cx88_tvnorm *norm)
 {
-	return (norm->id & V4L2_STD_625_50) ? 922 : 754;
+	return (norm->id & (V4L2_STD_MN & ~V4L2_STD_PAL_Nc)) ? 754 : 922;
 }
 
 static unsigned int inline norm_hdelay(struct cx88_tvnorm *norm)
 {
-	return (norm->id & V4L2_STD_625_50) ? 186 : 135;
+	return (norm->id & (V4L2_STD_MN & ~V4L2_STD_PAL_Nc)) ? 135 : 186;
 }
 
 static unsigned int inline norm_vdelay(struct cx88_tvnorm *norm)
@@ -648,24 +648,33 @@ static unsigned int inline norm_vdelay(s
 
 static unsigned int inline norm_fsc8(struct cx88_tvnorm *norm)
 {
-	static const unsigned int ntsc = 28636360;
-	static const unsigned int pal  = 35468950;
-	static const unsigned int palm  = 28604892;
-
 	if (norm->id & V4L2_STD_PAL_M)
-		return palm;
+		return 28604892;      // 3.575611 MHz
+
+	if (norm->id & (V4L2_STD_PAL_Nc))
+		return 28656448;      // 3.582056 MHz
+
+	if (norm->id & V4L2_STD_NTSC) // All NTSC/M and variants
+		return 28636360;      // 3.57954545 MHz +/- 10 Hz
 
-	return (norm->id & V4L2_STD_625_50) ? pal : ntsc;
+	/* SECAM have also different sub carrier for chroma,
+	   but step_db and step_dr, at cx88_set_tvnorm already handles that.
+
+	   The same FSC applies to PAL/BGDKIH, PAL/60, NTSC/4.43 and PAL/N
+	 */
+
+	return 35468950;      // 4.43361875 MHz +/- 5 Hz
 }
 
 static unsigned int inline norm_htotal(struct cx88_tvnorm *norm)
 {
-	/* Should always be Line Draw Time / (4*FSC) */
 
-	if (norm->id & V4L2_STD_PAL_M)
-		return 909;
+	unsigned int fsc4=norm_fsc8(norm)/2;
 
-	return (norm->id & V4L2_STD_625_50) ? 1135 : 910;
+	/* returns 4*FSC / vtotal / frames per seconds */
+	return (norm->id & V4L2_STD_625_50) ?
+				((fsc4+312)/625+12)/25 :
+				((fsc4+262)/525*1001+15000)/30000;
 }
 
 static unsigned int inline norm_vbipack(struct cx88_tvnorm *norm)
@@ -692,7 +701,7 @@ int cx88_set_scale(struct cx88_core *cor
 	value &= 0x3fe;
 	cx_write(MO_HDELAY_EVEN,  value);
 	cx_write(MO_HDELAY_ODD,   value);
-	dprintk(1,"set_scale: hdelay  0x%04x\n", value);
+	dprintk(1,"set_scale: hdelay  0x%04x (width %d)\n", value,swidth);
 
 	value = (swidth * 4096 / width) - 4096;
 	cx_write(MO_HSCALE_EVEN,  value);
diff --git a/drivers/media/video/cx88/cx88.h b/drivers/media/video/cx88/cx88.h
index 7054e94..a9575ad 100644
--- a/drivers/media/video/cx88/cx88.h
+++ b/drivers/media/video/cx88/cx88.h
@@ -91,7 +91,7 @@ struct cx88_tvnorm {
 
 static unsigned int inline norm_maxw(struct cx88_tvnorm *norm)
 {
-	return (norm->id & V4L2_STD_625_50) ? 768 : 640;
+	return (norm->id & (V4L2_STD_MN & ~V4L2_STD_PAL_Nc)) ? 720 : 768;
 }
 
 


^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [PATCH 11/28] V4L/DVB (4973): Dvb-core: fix printk type warning
  2006-12-27 16:50 [PATCH 00/28] V4L/DVB fixes Mauro Carvalho Chehab
                   ` (8 preceding siblings ...)
  2006-12-27 16:57 ` [PATCH 07/28] V4L/DVB (4967): Add missing tuner module option pal=60 for PAL-60 support Mauro Carvalho Chehab
@ 2006-12-27 16:57 ` Mauro Carvalho Chehab
  2006-12-27 16:57 ` [PATCH 13/28] V4L/DVB (4980): Fixes bug 7267: PAL/60 is not working Mauro Carvalho Chehab
                   ` (17 subsequent siblings)
  27 siblings, 0 replies; 29+ messages in thread
From: Mauro Carvalho Chehab @ 2006-12-27 16:57 UTC (permalink / raw)
  To: LKML; +Cc: V4L-DVB Maintainers, Michael Krufky, Mauro Carvalho Chehab


From: Michael Krufky <mkrufky@linuxtv.org>

dvb_net.c: In function 'dvb_net_ule':
dvb_net.c:628: warning: format '%#lx' expects type 'long unsigned int', but argument 3 has type 'u32'
dvb_net.c:628: warning: format '%#lx' expects type 'long unsigned int', but argument 4 has type 'u32'

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
---

 drivers/media/dvb/dvb-core/dvb_net.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/media/dvb/dvb-core/dvb_net.c b/drivers/media/dvb/dvb-core/dvb_net.c
index 8138b37..76e9c36 100644
--- a/drivers/media/dvb/dvb-core/dvb_net.c
+++ b/drivers/media/dvb/dvb-core/dvb_net.c
@@ -618,7 +618,7 @@ #endif
 				       *((u8 *)priv->ule_skb->tail - 2) << 8 |
 				       *((u8 *)priv->ule_skb->tail - 1);
 			if (ule_crc != expected_crc) {
-				printk(KERN_WARNING "%lu: CRC32 check FAILED: %#lx / %#lx, SNDU len %d type %#x, ts_remain %d, next 2: %x.\n",
+				printk(KERN_WARNING "%lu: CRC32 check FAILED: %08x / %08x, SNDU len %d type %#x, ts_remain %d, next 2: %x.\n",
 				       priv->ts_count, ule_crc, expected_crc, priv->ule_sndu_len, priv->ule_sndu_type, ts_remain, ts_remain > 2 ? *(unsigned short *)from_where : 0);
 
 #ifdef ULE_DEBUG


^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [PATCH 12/28] V4L/DVB (4979): Fixes compilation when CONFIG_V4L1_COMPAT is not selected
  2006-12-27 16:50 [PATCH 00/28] V4L/DVB fixes Mauro Carvalho Chehab
                   ` (10 preceding siblings ...)
  2006-12-27 16:57 ` [PATCH 13/28] V4L/DVB (4980): Fixes bug 7267: PAL/60 is not working Mauro Carvalho Chehab
@ 2006-12-27 16:57 ` Mauro Carvalho Chehab
  2006-12-27 16:57 ` [PATCH 10/28] V4L/DVB (4972): Dvb-core: fix bug in CRC-32 checking on 64-bit systems Mauro Carvalho Chehab
                   ` (15 subsequent siblings)
  27 siblings, 0 replies; 29+ messages in thread
From: Mauro Carvalho Chehab @ 2006-12-27 16:57 UTC (permalink / raw)
  To: LKML; +Cc: V4L-DVB Maintainers, Dwaine Garden, Mauro Carvalho Chehab


From: Dwaine Garden <DwaineGarden@rogers.com>

- SYSFS: Replaced all to_video_device(cd), video_device_create_file,
  video_device_remove_file and add the proper checks at create_file
- Converted old norm values to V4L2 ones.
- Robustness on sysfs hue/contrast/saturation queries.
  Additional check in order to return 0 if the driver is not opened.
- Whitespace cleanups in usbvision-cards.c

This patch merges two fixes by Thierry MERLE and Mauro Chehab, and adds
additional checks.

Signed-off-by: Dwaine Garden<DwaineGarden@rogers.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
---

 drivers/media/video/usbvision/usbvision-cards.c |   11 +-
 drivers/media/video/usbvision/usbvision-video.c |  134 +++++++++++++++--------
 2 files changed, 94 insertions(+), 51 deletions(-)

diff --git a/drivers/media/video/usbvision/usbvision-cards.c b/drivers/media/video/usbvision/usbvision-cards.c
index 134eb98..a40e583 100644
--- a/drivers/media/video/usbvision/usbvision-cards.c
+++ b/drivers/media/video/usbvision/usbvision-cards.c
@@ -39,8 +39,8 @@ struct usbvision_device_data_st  usbvisi
 	{0x0573, 0x0400, -1, CODEC_SAA7113, 4, V4L2_STD_NTSC,  0, 0, 1, 0, 0,                          -1, -1,  0,  3,  7, "D-Link V100"},
 	{0x0573, 0x2000, -1, CODEC_SAA7111, 2, V4L2_STD_NTSC,  1, 0, 1, 0, 0,                          -1, -1, -1, -1, -1, "X10 USB Camera"},
 	{0x0573, 0x2d00, -1, CODEC_SAA7111, 2, V4L2_STD_PAL,   1, 0, 1, 0, 0,                          -1, -1, -1,  3,  7, "Osprey 50"},
-	{0x0573, 0x2d01, -1, CODEC_SAA7113, 2, V4L2_STD_NTSC,	 0, 0, 1, 0, 0,				 -1, -1,  0,  3,  7, "Hauppauge USB-Live Model 600"},
-	{0x0573, 0x2101, -1, CODEC_SAA7113, 2, V4L2_STD_PAL, 	 2, 0, 1, 0, 0,                          -1, -1,  0,  3,  7, "Zoran Co. PMD (Nogatech) AV-grabber Manhattan"},
+	{0x0573, 0x2d01, -1, CODEC_SAA7113, 2, V4L2_STD_NTSC,  0, 0, 1, 0, 0,			       -1, -1,  0,  3,  7, "Hauppauge USB-Live Model 600"},
+	{0x0573, 0x2101, -1, CODEC_SAA7113, 2, V4L2_STD_PAL,   2, 0, 1, 0, 0,                          -1, -1,  0,  3,  7, "Zoran Co. PMD (Nogatech) AV-grabber Manhattan"},
 	{0x0573, 0x4100, -1, CODEC_SAA7111, 3, V4L2_STD_NTSC,  1, 1, 1, 1, TUNER_PHILIPS_NTSC_M,       -1, -1, -1, 20, -1, "Nogatech USB-TV (NTSC) FM"},
 	{0x0573, 0x4110, -1, CODEC_SAA7111, 3, V4L2_STD_NTSC,  1, 1, 1, 1, TUNER_PHILIPS_NTSC_M,       -1, -1, -1, 20, -1, "PNY USB-TV (NTSC) FM"},
 	{0x0573, 0x4450,  0, CODEC_SAA7113, 3, V4L2_STD_PAL,   1, 1, 1, 1, TUNER_PHILIPS_PAL,          -1, -1,  0,  3,  7, "PixelView PlayTv-USB PRO (PAL) FM"},
@@ -71,10 +71,10 @@ struct usbvision_device_data_st  usbvisi
 	{0x0573, 0x4d37,  0, CODEC_SAA7113, 3, V4L2_STD_PAL,   1, 1, 1, 1, TUNER_PHILIPS_FM1216ME_MK3, -1, -1,  0,  3,  7, "Hauppauge WinTV USB device Model 40219 Rev E189"},
 	{0x0768, 0x0006, -1, CODEC_SAA7113, 3, V4L2_STD_NTSC,  1, 1, 1, 1, TUNER_PHILIPS_NTSC_M,       -1, -1,  5,  5, -1, "Camtel Technology USB TV Genie Pro FM Model TVB330"},
 	{0x07d0, 0x0001, -1, CODEC_SAA7113, 2, V4L2_STD_PAL,   0, 0, 1, 0, 0,                          -1, -1,  0,  3,  7, "Digital Video Creator I"},
-	{0x07d0, 0x0002, -1, CODEC_SAA7111, 2, V4L2_STD_NTSC,  0, 0, 1, 0, 0,   			 -1, -1, 82, 20,  7, "Global Village GV-007 (NTSC)"},
+	{0x07d0, 0x0002, -1, CODEC_SAA7111, 2, V4L2_STD_NTSC,  0, 0, 1, 0, 0,   		       -1, -1, 82, 20,  7, "Global Village GV-007 (NTSC)"},
 	{0x07d0, 0x0003,  0, CODEC_SAA7113, 2, V4L2_STD_NTSC,  0, 0, 1, 0, 0,                          -1, -1,  0,  3,  7, "Dazzle Fusion Model DVC-50 Rev 1 (NTSC)"},
 	{0x07d0, 0x0004,  0, CODEC_SAA7113, 2, V4L2_STD_PAL,   0, 0, 1, 0, 0,                          -1, -1,  0,  3,  7, "Dazzle Fusion Model DVC-80 Rev 1 (PAL)"},
-	{0x07d0, 0x0005,  0, CODEC_SAA7113, 2, V4L2_STD_SECAM, 0, 0, 1, 0, 0,				 -1, -1,  0,  3,  7, "Dazzle Fusion Model DVC-90 Rev 1 (SECAM)"},
+	{0x07d0, 0x0005,  0, CODEC_SAA7113, 2, V4L2_STD_SECAM, 0, 0, 1, 0, 0,			       -1, -1,  0,  3,  7, "Dazzle Fusion Model DVC-90 Rev 1 (SECAM)"},
 	{0x2304, 0x010d, -1, CODEC_SAA7111, 3, V4L2_STD_PAL,   1, 0, 0, 1, TUNER_TEMIC_4066FY5_PAL_I,  -1, -1, -1, -1, -1, "Pinnacle Studio PCTV USB (PAL)"},
 	{0x2304, 0x0109, -1, CODEC_SAA7111, 3, V4L2_STD_SECAM, 1, 0, 1, 1, TUNER_PHILIPS_SECAM,        -1, -1, -1, -1, -1, "Pinnacle Studio PCTV USB (SECAM)"},
 	{0x2304, 0x0110, -1, CODEC_SAA7111, 3, V4L2_STD_PAL,   1, 1, 1, 1, TUNER_PHILIPS_PAL,          -1, -1,128, 23, -1, "Pinnacle Studio PCTV USB (PAL) FM"},
@@ -86,7 +86,7 @@ struct usbvision_device_data_st  usbvisi
 	{0x2304, 0x0300, -1, CODEC_SAA7113, 2, V4L2_STD_NTSC,  1, 0, 1, 0, 0,                          -1, -1,  0,  3,  7, "Pinnacle Studio Linx Video input cable (NTSC)"},
 	{0x2304, 0x0301, -1, CODEC_SAA7113, 2, V4L2_STD_PAL,   1, 0, 1, 0, 0,                          -1, -1,  0,  3,  7, "Pinnacle Studio Linx Video input cable (PAL)"},
 	{0x2304, 0x0419, -1, CODEC_SAA7113, 3, V4L2_STD_PAL,   1, 1, 1, 1, TUNER_TEMIC_4009FR5_PAL,    -1, -1,  0,  3,  7, "Pinnacle PCTV Bungee USB (PAL) FM"},
-	{0x2400, 0x4200, -1, CODEC_SAA7111, 3, VIDEO_MODE_NTSC,  1, 0, 1, 1, TUNER_PHILIPS_NTSC_M,       -1, -1, -1, -1, -1, "Hauppauge WinTv-USB"},
+	{0x2400, 0x4200, -1, CODEC_SAA7111, 3, V4L2_STD_NTSC,  1, 0, 1, 1, TUNER_PHILIPS_NTSC_M,       -1, -1, -1, -1, -1, "Hauppauge WinTv-USB"},
 	{}  /* Terminating entry */
 };
 
@@ -148,7 +148,6 @@ struct usb_device_id usbvision_table [] 
 	{ USB_DEVICE(0x2304, 0x0300) },  /* Pinnacle Studio Linx Video input cable (NTSC) */
 	{ USB_DEVICE(0x2304, 0x0301) },  /* Pinnacle Studio Linx Video input cable (PAL) */
 	{ USB_DEVICE(0x2304, 0x0419) },  /* Pinnacle PCTV Bungee USB (PAL) FM */
-
 	{ USB_DEVICE(0x2400, 0x4200) },  /* Hauppauge WinTv-USB2 Model 42012 */
 
 	{ }  /* Terminating entry */
diff --git a/drivers/media/video/usbvision/usbvision-video.c b/drivers/media/video/usbvision/usbvision-video.c
index 31b133e..8c7eba2 100644
--- a/drivers/media/video/usbvision/usbvision-video.c
+++ b/drivers/media/video/usbvision/usbvision-video.c
@@ -204,7 +204,7 @@ #define YES_NO(x) ((x) ? "Yes" : "No")
 
 static inline struct usb_usbvision *cd_to_usbvision(struct class_device *cd)
 {
-	struct video_device *vdev = to_video_device(cd);
+	struct video_device *vdev = container_of(cd, struct video_device, class_dev);
 	return video_get_drvdata(vdev);
 }
 
@@ -214,81 +214,85 @@ static ssize_t show_version(struct class
 }
 static CLASS_DEVICE_ATTR(version, S_IRUGO, show_version, NULL);
 
-static ssize_t show_model(struct class_device *class_dev, char *buf)
+static ssize_t show_model(struct class_device *cd, char *buf)
 {
-	struct video_device *vdev = to_video_device(class_dev);
+	struct video_device *vdev = container_of(cd, struct video_device, class_dev);
 	struct usb_usbvision *usbvision = video_get_drvdata(vdev);
 	return sprintf(buf, "%s\n", usbvision_device_data[usbvision->DevModel].ModelString);
 }
 static CLASS_DEVICE_ATTR(model, S_IRUGO, show_model, NULL);
 
-static ssize_t show_hue(struct class_device *class_dev, char *buf)
+static ssize_t show_hue(struct class_device *cd, char *buf)
 {
-	struct video_device *vdev = to_video_device(class_dev);
+	struct video_device *vdev = container_of(cd, struct video_device, class_dev);
 	struct usb_usbvision *usbvision = video_get_drvdata(vdev);
 	struct v4l2_control ctrl;
 	ctrl.id = V4L2_CID_HUE;
 	ctrl.value = 0;
-	call_i2c_clients(usbvision, VIDIOC_G_CTRL, &ctrl);
+	if(usbvision->user)
+		call_i2c_clients(usbvision, VIDIOC_G_CTRL, &ctrl);
 	return sprintf(buf, "%d\n", ctrl.value >> 8);
 }
 static CLASS_DEVICE_ATTR(hue, S_IRUGO, show_hue, NULL);
 
-static ssize_t show_contrast(struct class_device *class_dev, char *buf)
+static ssize_t show_contrast(struct class_device *cd, char *buf)
 {
-	struct video_device *vdev = to_video_device(class_dev);
+	struct video_device *vdev = container_of(cd, struct video_device, class_dev);
 	struct usb_usbvision *usbvision = video_get_drvdata(vdev);
 	struct v4l2_control ctrl;
 	ctrl.id = V4L2_CID_CONTRAST;
 	ctrl.value = 0;
-	call_i2c_clients(usbvision, VIDIOC_G_CTRL, &ctrl);
+	if(usbvision->user)
+		call_i2c_clients(usbvision, VIDIOC_G_CTRL, &ctrl);
 	return sprintf(buf, "%d\n", ctrl.value >> 8);
 }
 static CLASS_DEVICE_ATTR(contrast, S_IRUGO, show_contrast, NULL);
 
-static ssize_t show_brightness(struct class_device *class_dev, char *buf)
+static ssize_t show_brightness(struct class_device *cd, char *buf)
 {
-	struct video_device *vdev = to_video_device(class_dev);
+	struct video_device *vdev = container_of(cd, struct video_device, class_dev);
 	struct usb_usbvision *usbvision = video_get_drvdata(vdev);
 	struct v4l2_control ctrl;
 	ctrl.id = V4L2_CID_BRIGHTNESS;
 	ctrl.value = 0;
-	call_i2c_clients(usbvision, VIDIOC_G_CTRL, &ctrl);
+	if(usbvision->user)
+		call_i2c_clients(usbvision, VIDIOC_G_CTRL, &ctrl);
 	return sprintf(buf, "%d\n", ctrl.value >> 8);
 }
 static CLASS_DEVICE_ATTR(brightness, S_IRUGO, show_brightness, NULL);
 
-static ssize_t show_saturation(struct class_device *class_dev, char *buf)
+static ssize_t show_saturation(struct class_device *cd, char *buf)
 {
-	struct video_device *vdev = to_video_device(class_dev);
+	struct video_device *vdev = container_of(cd, struct video_device, class_dev);
 	struct usb_usbvision *usbvision = video_get_drvdata(vdev);
 	struct v4l2_control ctrl;
 	ctrl.id = V4L2_CID_SATURATION;
 	ctrl.value = 0;
-	call_i2c_clients(usbvision, VIDIOC_G_CTRL, &ctrl);
+	if(usbvision->user)
+		call_i2c_clients(usbvision, VIDIOC_G_CTRL, &ctrl);
 	return sprintf(buf, "%d\n", ctrl.value >> 8);
 }
 static CLASS_DEVICE_ATTR(saturation, S_IRUGO, show_saturation, NULL);
 
-static ssize_t show_streaming(struct class_device *class_dev, char *buf)
+static ssize_t show_streaming(struct class_device *cd, char *buf)
 {
-	struct video_device *vdev = to_video_device(class_dev);
+	struct video_device *vdev = container_of(cd, struct video_device, class_dev);
 	struct usb_usbvision *usbvision = video_get_drvdata(vdev);
 	return sprintf(buf, "%s\n", YES_NO(usbvision->streaming==Stream_On?1:0));
 }
 static CLASS_DEVICE_ATTR(streaming, S_IRUGO, show_streaming, NULL);
 
-static ssize_t show_compression(struct class_device *class_dev, char *buf)
+static ssize_t show_compression(struct class_device *cd, char *buf)
 {
-	struct video_device *vdev = to_video_device(class_dev);
+	struct video_device *vdev = container_of(cd, struct video_device, class_dev);
 	struct usb_usbvision *usbvision = video_get_drvdata(vdev);
 	return sprintf(buf, "%s\n", YES_NO(usbvision->isocMode==ISOC_MODE_COMPRESS));
 }
 static CLASS_DEVICE_ATTR(compression, S_IRUGO, show_compression, NULL);
 
-static ssize_t show_device_bridge(struct class_device *class_dev, char *buf)
+static ssize_t show_device_bridge(struct class_device *cd, char *buf)
 {
-	struct video_device *vdev = to_video_device(class_dev);
+	struct video_device *vdev = container_of(cd, struct video_device, class_dev);
 	struct usb_usbvision *usbvision = video_get_drvdata(vdev);
 	return sprintf(buf, "%d\n", usbvision->bridgeType);
 }
@@ -297,31 +301,71 @@ static CLASS_DEVICE_ATTR(bridge, S_IRUGO
 static void usbvision_create_sysfs(struct video_device *vdev)
 {
 	int res;
-	if (vdev) {
-		res=video_device_create_file(vdev, &class_device_attr_version);
-		res=video_device_create_file(vdev, &class_device_attr_model);
-		res=video_device_create_file(vdev, &class_device_attr_hue);
-		res=video_device_create_file(vdev, &class_device_attr_contrast);
-		res=video_device_create_file(vdev, &class_device_attr_brightness);
-		res=video_device_create_file(vdev, &class_device_attr_saturation);
-		res=video_device_create_file(vdev, &class_device_attr_streaming);
-		res=video_device_create_file(vdev, &class_device_attr_compression);
-		res=video_device_create_file(vdev, &class_device_attr_bridge);
-	}
+	if (!vdev)
+		return;
+	do {
+		res=class_device_create_file(&vdev->class_dev,
+					     &class_device_attr_version);
+		if (res<0)
+			break;
+		res=class_device_create_file(&vdev->class_dev,
+					     &class_device_attr_model);
+		if (res<0)
+			break;
+		res=class_device_create_file(&vdev->class_dev,
+					     &class_device_attr_hue);
+		if (res<0)
+			break;
+		res=class_device_create_file(&vdev->class_dev,
+					     &class_device_attr_contrast);
+		if (res<0)
+			break;
+		res=class_device_create_file(&vdev->class_dev,
+					     &class_device_attr_brightness);
+		if (res<0)
+			break;
+		res=class_device_create_file(&vdev->class_dev,
+					     &class_device_attr_saturation);
+		if (res<0)
+			break;
+		res=class_device_create_file(&vdev->class_dev,
+					     &class_device_attr_streaming);
+		if (res<0)
+			break;
+		res=class_device_create_file(&vdev->class_dev,
+					     &class_device_attr_compression);
+		if (res<0)
+			break;
+		res=class_device_create_file(&vdev->class_dev,
+					     &class_device_attr_bridge);
+		if (res>=0)
+			return;
+	} while (0);
+
+	err("%s error: %d\n", __FUNCTION__, res);
 }
 
 static void usbvision_remove_sysfs(struct video_device *vdev)
 {
 	if (vdev) {
-		video_device_remove_file(vdev, &class_device_attr_version);
-		video_device_remove_file(vdev, &class_device_attr_model);
-		video_device_remove_file(vdev, &class_device_attr_hue);
-		video_device_remove_file(vdev, &class_device_attr_contrast);
-		video_device_remove_file(vdev, &class_device_attr_brightness);
-		video_device_remove_file(vdev, &class_device_attr_saturation);
-		video_device_remove_file(vdev, &class_device_attr_streaming);
-		video_device_remove_file(vdev, &class_device_attr_compression);
-		video_device_remove_file(vdev, &class_device_attr_bridge);
+		class_device_remove_file(&vdev->class_dev,
+					 &class_device_attr_version);
+		class_device_remove_file(&vdev->class_dev,
+					 &class_device_attr_model);
+		class_device_remove_file(&vdev->class_dev,
+					 &class_device_attr_hue);
+		class_device_remove_file(&vdev->class_dev,
+					 &class_device_attr_contrast);
+		class_device_remove_file(&vdev->class_dev,
+					 &class_device_attr_brightness);
+		class_device_remove_file(&vdev->class_dev,
+					 &class_device_attr_saturation);
+		class_device_remove_file(&vdev->class_dev,
+					 &class_device_attr_streaming);
+		class_device_remove_file(&vdev->class_dev,
+					 &class_device_attr_compression);
+		class_device_remove_file(&vdev->class_dev,
+					 &class_device_attr_bridge);
 	}
 }
 
@@ -1933,22 +1977,22 @@ static void customdevice_process(void)
 		{
 			case 'P':
 				PDEBUG(DBG_PROBE, "VideoNorm=PAL");
-				usbvision_device_data[0].VideoNorm=VIDEO_MODE_PAL;
+				usbvision_device_data[0].VideoNorm=V4L2_STD_PAL;
 				break;
 
 			case 'S':
 				PDEBUG(DBG_PROBE, "VideoNorm=SECAM");
-				usbvision_device_data[0].VideoNorm=VIDEO_MODE_SECAM;
+				usbvision_device_data[0].VideoNorm=V4L2_STD_SECAM;
 				break;
 
 			case 'N':
 				PDEBUG(DBG_PROBE, "VideoNorm=NTSC");
-				usbvision_device_data[0].VideoNorm=VIDEO_MODE_NTSC;
+				usbvision_device_data[0].VideoNorm=V4L2_STD_NTSC;
 				break;
 
 			default:
 				PDEBUG(DBG_PROBE, "VideoNorm=PAL (by default)");
-				usbvision_device_data[0].VideoNorm=VIDEO_MODE_PAL;
+				usbvision_device_data[0].VideoNorm=V4L2_STD_PAL;
 				break;
 		}
 		goto2next(parse);


^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [PATCH 10/28] V4L/DVB (4972): Dvb-core: fix bug in CRC-32 checking on 64-bit systems
  2006-12-27 16:50 [PATCH 00/28] V4L/DVB fixes Mauro Carvalho Chehab
                   ` (11 preceding siblings ...)
  2006-12-27 16:57 ` [PATCH 12/28] V4L/DVB (4979): Fixes compilation when CONFIG_V4L1_COMPAT is not selected Mauro Carvalho Chehab
@ 2006-12-27 16:57 ` Mauro Carvalho Chehab
  2006-12-27 16:57 ` [PATCH 18/28] V4L/DVB (4990): Cpia2/cpia2_usb.c: fix error-path leak Mauro Carvalho Chehab
                   ` (14 subsequent siblings)
  27 siblings, 0 replies; 29+ messages in thread
From: Mauro Carvalho Chehab @ 2006-12-27 16:57 UTC (permalink / raw)
  To: LKML
  Cc: V4L-DVB Maintainers, Ang Way Chuang, Michael Krufky,
	Mauro Carvalho Chehab


From: Ang Way Chuang <wcang@nrg.cs.usm.my>

CRC-32 checking during ULE decapsulation always failed on x86_64 systems due
to the size of a variable used to store CRC. This bug was discovered on
Fedora Core 6 with kernel-2.6.18-1.2849. The i386 counterpart has no such
problem. This patch has been tested on 64-bit system as well as 32-bit system.

Signed-off-by: Ang Way Chuang <wcang@nrg.cs.usm.my>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
---

 drivers/media/dvb/dvb-core/dvb_net.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/media/dvb/dvb-core/dvb_net.c b/drivers/media/dvb/dvb-core/dvb_net.c
index ebf4dc5..8138b37 100644
--- a/drivers/media/dvb/dvb-core/dvb_net.c
+++ b/drivers/media/dvb/dvb-core/dvb_net.c
@@ -605,7 +605,7 @@ #endif
 				{ &utype, sizeof utype },
 				{ priv->ule_skb->data, priv->ule_skb->len - 4 }
 			};
-			unsigned long ule_crc = ~0L, expected_crc;
+			u32 ule_crc = ~0L, expected_crc;
 			if (priv->ule_dbit) {
 				/* Set D-bit for CRC32 verification,
 				 * if it was set originally. */


^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [PATCH 18/28] V4L/DVB (4990): Cpia2/cpia2_usb.c: fix error-path leak
  2006-12-27 16:50 [PATCH 00/28] V4L/DVB fixes Mauro Carvalho Chehab
                   ` (12 preceding siblings ...)
  2006-12-27 16:57 ` [PATCH 10/28] V4L/DVB (4972): Dvb-core: fix bug in CRC-32 checking on 64-bit systems Mauro Carvalho Chehab
@ 2006-12-27 16:57 ` Mauro Carvalho Chehab
  2006-12-27 16:57 ` [PATCH 14/28] V4L/DVB (4982): Fix broken audio mode handling for line-in in msp3400 Mauro Carvalho Chehab
                   ` (13 subsequent siblings)
  27 siblings, 0 replies; 29+ messages in thread
From: Mauro Carvalho Chehab @ 2006-12-27 16:57 UTC (permalink / raw)
  To: LKML
  Cc: V4L-DVB Maintainers, Amit Choudhary, Andrew Morton,
	Mauro Carvalho Chehab


From: Amit Choudhary <amit2030@gmail.com>

Free previously allocated memory (in array elements) if kmalloc() returns
NULL in submit_urbs().

Signed-off-by: Amit Choudhary <amit2030@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
---

 drivers/media/video/cpia2/cpia2_usb.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/drivers/media/video/cpia2/cpia2_usb.c b/drivers/media/video/cpia2/cpia2_usb.c
index 28dc6a1..d8e9298 100644
--- a/drivers/media/video/cpia2/cpia2_usb.c
+++ b/drivers/media/video/cpia2/cpia2_usb.c
@@ -640,6 +640,10 @@ static int submit_urbs(struct camera_dat
 		cam->sbuf[i].data =
 		    kmalloc(FRAMES_PER_DESC * FRAME_SIZE_PER_DESC, GFP_KERNEL);
 		if (!cam->sbuf[i].data) {
+			while (--i >= 0) {
+				kfree(cam->sbuf[i].data);
+				cam->sbuf[i].data = NULL;
+			}
 			return -ENOMEM;
 		}
 	}


^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [PATCH 17/28] V4L/DVB (4988): Cx2341x audio_properties is an u16, not u8
  2006-12-27 16:50 [PATCH 00/28] V4L/DVB fixes Mauro Carvalho Chehab
                   ` (15 preceding siblings ...)
  2006-12-27 16:57 ` [PATCH 15/28] V4L/DVB (4983): Force temporal filter to 0 when scaling to prevent ghosting Mauro Carvalho Chehab
@ 2006-12-27 16:57 ` Mauro Carvalho Chehab
  2006-12-27 16:57 ` [PATCH 16/28] V4L/DVB (4984): LOG_STATUS should show the real temporal filter value Mauro Carvalho Chehab
                   ` (10 subsequent siblings)
  27 siblings, 0 replies; 29+ messages in thread
From: Mauro Carvalho Chehab @ 2006-12-27 16:57 UTC (permalink / raw)
  To: LKML; +Cc: V4L-DVB Maintainers, Hans Verkuil, Mauro Carvalho Chehab


From: Hans Verkuil <hverkuil@xs4all.nl>

This bug broke the MPEG audio mode controls.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
---

 include/media/cx2341x.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/include/media/cx2341x.h b/include/media/cx2341x.h
index d91d88f..ecad55b 100644
--- a/include/media/cx2341x.h
+++ b/include/media/cx2341x.h
@@ -49,7 +49,7 @@ struct cx2341x_mpeg_params {
 	enum v4l2_mpeg_audio_mode_extension audio_mode_extension;
 	enum v4l2_mpeg_audio_emphasis audio_emphasis;
 	enum v4l2_mpeg_audio_crc audio_crc;
-	u8 audio_properties;
+	u16 audio_properties;
 
 	/* video */
 	enum v4l2_mpeg_video_encoding video_encoding;


^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [PATCH 14/28] V4L/DVB (4982): Fix broken audio mode handling for line-in in msp3400.
  2006-12-27 16:50 [PATCH 00/28] V4L/DVB fixes Mauro Carvalho Chehab
                   ` (13 preceding siblings ...)
  2006-12-27 16:57 ` [PATCH 18/28] V4L/DVB (4990): Cpia2/cpia2_usb.c: fix error-path leak Mauro Carvalho Chehab
@ 2006-12-27 16:57 ` Mauro Carvalho Chehab
  2006-12-27 16:57 ` [PATCH 15/28] V4L/DVB (4983): Force temporal filter to 0 when scaling to prevent ghosting Mauro Carvalho Chehab
                   ` (12 subsequent siblings)
  27 siblings, 0 replies; 29+ messages in thread
From: Mauro Carvalho Chehab @ 2006-12-27 16:57 UTC (permalink / raw)
  To: LKML; +Cc: V4L-DVB Maintainers, Hans Verkuil, Mauro Carvalho Chehab


From: Hans Verkuil <hverkuil@xs4all.nl>

The wrong matrix was used when an external input was selected instead of
the tuner input. The rxsubchans field was also not initialized to STEREO
for an external input. And finally the msp34xxg_detect_stereo() should
not try to detect stereo for an external input, that code is for the
tuner input only.
Together these bugs made it hit 'n miss whether you ever got stereo out
of the msp3400 for an external input.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
---

 drivers/media/video/msp3400-driver.c   |    6 ++----
 drivers/media/video/msp3400-kthreads.c |   11 ++++++++---
 2 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/drivers/media/video/msp3400-driver.c b/drivers/media/video/msp3400-driver.c
index e1b56dc..295cb99 100644
--- a/drivers/media/video/msp3400-driver.c
+++ b/drivers/media/video/msp3400-driver.c
@@ -633,10 +633,8 @@ #endif
 			if (((rt->input >> (4 + i * 4)) & 0xf) == 0)
 				extern_input = 0;
 		}
-		if (extern_input)
-			state->mode = MSP_MODE_EXTERN;
-		else
-			state->mode = MSP_MODE_AM_DETECT;
+		state->mode = extern_input ? MSP_MODE_EXTERN : MSP_MODE_AM_DETECT;
+		state->rxsubchans = V4L2_TUNER_SUB_STEREO;
 		msp_set_scart(client, sc_in, 0);
 		msp_set_scart(client, sc1_out, 1);
 		msp_set_scart(client, sc2_out, 2);
diff --git a/drivers/media/video/msp3400-kthreads.c b/drivers/media/video/msp3400-kthreads.c
index 4c7f85b..e1821eb 100644
--- a/drivers/media/video/msp3400-kthreads.c
+++ b/drivers/media/video/msp3400-kthreads.c
@@ -483,7 +483,6 @@ int msp3400c_thread(void *data)
 			/* no carrier scan, just unmute */
 			v4l_dbg(1, msp_debug, client, "thread: no carrier scan\n");
 			state->scan_in_progress = 0;
-			state->rxsubchans = V4L2_TUNER_SUB_STEREO;
 			msp_set_audio(client);
 			continue;
 		}
@@ -851,12 +850,15 @@ static void msp34xxg_set_source(struct i
 		source = 1; /* stereo or A|B */
 		matrix = 0x20;
 		break;
-	case V4L2_TUNER_MODE_STEREO:
 	case V4L2_TUNER_MODE_LANG1:
-	default:
 		source = 3; /* stereo or A */
 		matrix = 0x00;
 		break;
+	case V4L2_TUNER_MODE_STEREO:
+	default:
+		source = 3; /* stereo or A */
+		matrix = 0x20;
+		break;
 	}
 
 	if (in == MSP_DSP_IN_TUNER)
@@ -1030,6 +1032,9 @@ static int msp34xxg_detect_stereo(struct
 	int is_stereo = status & 0x40;
 	int oldrx = state->rxsubchans;
 
+	if (state->mode == MSP_MODE_EXTERN)
+		return 0;
+
 	state->rxsubchans = 0;
 	if (is_stereo)
 		state->rxsubchans = V4L2_TUNER_SUB_STEREO;


^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [PATCH 16/28] V4L/DVB (4984): LOG_STATUS should show the real temporal filter value.
  2006-12-27 16:50 [PATCH 00/28] V4L/DVB fixes Mauro Carvalho Chehab
                   ` (16 preceding siblings ...)
  2006-12-27 16:57 ` [PATCH 17/28] V4L/DVB (4988): Cx2341x audio_properties is an u16, not u8 Mauro Carvalho Chehab
@ 2006-12-27 16:57 ` Mauro Carvalho Chehab
  2006-12-27 16:57 ` [PATCH 19/28] V4L/DVB (4991): Cafe_ccic.c: fix NULL dereference Mauro Carvalho Chehab
                   ` (9 subsequent siblings)
  27 siblings, 0 replies; 29+ messages in thread
From: Mauro Carvalho Chehab @ 2006-12-27 16:57 UTC (permalink / raw)
  To: LKML; +Cc: V4L-DVB Maintainers, Hans Verkuil, Mauro Carvalho Chehab


From: Hans Verkuil <hverkuil@xs4all.nl>

The temporal filter is forced off when scaling. The VIDIOC_LOG_STATUS
handler still showed the old temporal filter. It is now consistent with
the real temporal filter value.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
---

 drivers/media/video/cx2341x.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/drivers/media/video/cx2341x.c b/drivers/media/video/cx2341x.c
index e796afd..2f5ca71 100644
--- a/drivers/media/video/cx2341x.c
+++ b/drivers/media/video/cx2341x.c
@@ -863,6 +863,7 @@ invalid:
 void cx2341x_log_status(struct cx2341x_mpeg_params *p, const char *prefix)
 {
 	int is_mpeg1 = p->video_encoding == V4L2_MPEG_VIDEO_ENCODING_MPEG_1;
+	int temporal = p->video_temporal_filter;
 
 	/* Stream */
 	printk(KERN_INFO "%s: Stream: %s\n",
@@ -919,10 +920,13 @@ void cx2341x_log_status(struct cx2341x_m
 		cx2341x_menu_item(p, V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE),
 		cx2341x_menu_item(p, V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE),
 		p->video_spatial_filter);
+	if (p->width != 720 || p->height != (p->is_50hz ? 576 : 480)) {
+		temporal = 0;
+	}
 	printk(KERN_INFO "%s: Temporal Filter: %s, %d\n",
 		prefix,
 		cx2341x_menu_item(p, V4L2_CID_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE),
-		p->video_temporal_filter);
+		temporal);
 	printk(KERN_INFO "%s: Median Filter:   %s, Luma [%d, %d], Chroma [%d, %d]\n",
 		prefix,
 		cx2341x_menu_item(p, V4L2_CID_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE),


^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [PATCH 15/28] V4L/DVB (4983): Force temporal filter to 0 when scaling to prevent ghosting.
  2006-12-27 16:50 [PATCH 00/28] V4L/DVB fixes Mauro Carvalho Chehab
                   ` (14 preceding siblings ...)
  2006-12-27 16:57 ` [PATCH 14/28] V4L/DVB (4982): Fix broken audio mode handling for line-in in msp3400 Mauro Carvalho Chehab
@ 2006-12-27 16:57 ` Mauro Carvalho Chehab
  2006-12-27 16:57 ` [PATCH 17/28] V4L/DVB (4988): Cx2341x audio_properties is an u16, not u8 Mauro Carvalho Chehab
                   ` (11 subsequent siblings)
  27 siblings, 0 replies; 29+ messages in thread
From: Mauro Carvalho Chehab @ 2006-12-27 16:57 UTC (permalink / raw)
  To: LKML; +Cc: V4L-DVB Maintainers, Hans Verkuil, Mauro Carvalho Chehab


From: Hans Verkuil <hverkuil@xs4all.nl>

Change the code to unconditionally turn off the temporal filter when scaling.
If the window is not full screen the filter will introduce a nasty ghosting
effect.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
---

 drivers/media/video/cx2341x.c |   15 ++++++---------
 1 files changed, 6 insertions(+), 9 deletions(-)

diff --git a/drivers/media/video/cx2341x.c b/drivers/media/video/cx2341x.c
index 657e0b9..e796afd 100644
--- a/drivers/media/video/cx2341x.c
+++ b/drivers/media/video/cx2341x.c
@@ -742,7 +742,6 @@ int cx2341x_update(void *priv, cx2341x_m
 
 	if (old == NULL || old->width != new->width || old->height != new->height ||
 			old->video_encoding != new->video_encoding) {
-		int is_scaling;
 		u16 w = new->width;
 		u16 h = new->height;
 
@@ -752,20 +751,18 @@ int cx2341x_update(void *priv, cx2341x_m
 		}
 		err = cx2341x_api(priv, func, CX2341X_ENC_SET_FRAME_SIZE, 2, h, w);
 		if (err) return err;
+	}
 
+	if (new->width != 720 || new->height != (new->is_50hz ? 576 : 480)) {
 		/* Adjust temporal filter if necessary. The problem with the temporal
 		   filter is that it works well with full resolution capturing, but
 		   not when the capture window is scaled (the filter introduces
-		   a ghosting effect). So if the capture window changed, and there is
-		   no updated filter value, then the filter is set depending on whether
-		   the new window is full resolution or not.
+		   a ghosting effect). So if the capture window is scaled, then
+		   force the filter to 0.
 
-		   For full resolution a setting of 8 really improves the video
+		   For full resolution the filter really improves the video
 		   quality, especially if the original video quality is suboptimal. */
-		is_scaling = new->width != 720 || new->height != (new->is_50hz ? 576 : 480);
-		if (old && old->video_temporal_filter == temporal) {
-			temporal = is_scaling ? 0 : 8;
-		}
+		temporal = 0;
 	}
 
 	if (old == NULL || old->stream_type != new->stream_type) {


^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [PATCH 19/28] V4L/DVB (4991): Cafe_ccic.c: fix NULL dereference
  2006-12-27 16:50 [PATCH 00/28] V4L/DVB fixes Mauro Carvalho Chehab
                   ` (17 preceding siblings ...)
  2006-12-27 16:57 ` [PATCH 16/28] V4L/DVB (4984): LOG_STATUS should show the real temporal filter value Mauro Carvalho Chehab
@ 2006-12-27 16:57 ` Mauro Carvalho Chehab
  2006-12-27 16:57 ` [PATCH 20/28] V4L/DVB (4992): Fix typo in saa7134-dvb.c Mauro Carvalho Chehab
                   ` (8 subsequent siblings)
  27 siblings, 0 replies; 29+ messages in thread
From: Mauro Carvalho Chehab @ 2006-12-27 16:57 UTC (permalink / raw)
  To: LKML; +Cc: V4L-DVB Maintainers, Adrian Bunk, Mauro Carvalho Chehab


From: Adrian Bunk <bunk@stusta.de>

We shouldn't dereference "cam" when we already know it's NULL.
Spotted by the Coverity checker.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
---

 drivers/media/video/cafe_ccic.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/media/video/cafe_ccic.c b/drivers/media/video/cafe_ccic.c
index e347c7e..3083c80 100644
--- a/drivers/media/video/cafe_ccic.c
+++ b/drivers/media/video/cafe_ccic.c
@@ -2166,7 +2166,7 @@ static void cafe_pci_remove(struct pci_d
 	struct cafe_camera *cam = cafe_find_by_pdev(pdev);
 
 	if (cam == NULL) {
-		cam_warn(cam, "pci_remove on unknown pdev %p\n", pdev);
+		printk(KERN_WARNING "pci_remove on unknown pdev %p\n", pdev);
 		return;
 	}
 	mutex_lock(&cam->s_mutex);


^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [PATCH 21/28] V4L/DVB (4994): Vivi: fix use after free in list_for_each()
  2006-12-27 16:50 [PATCH 00/28] V4L/DVB fixes Mauro Carvalho Chehab
                   ` (19 preceding siblings ...)
  2006-12-27 16:57 ` [PATCH 20/28] V4L/DVB (4992): Fix typo in saa7134-dvb.c Mauro Carvalho Chehab
@ 2006-12-27 16:57 ` Mauro Carvalho Chehab
  2006-12-27 16:57 ` [PATCH 22/28] V4L/DVB (4995): Vivi: fix kthread_run() error check Mauro Carvalho Chehab
                   ` (6 subsequent siblings)
  27 siblings, 0 replies; 29+ messages in thread
From: Mauro Carvalho Chehab @ 2006-12-27 16:57 UTC (permalink / raw)
  To: LKML; +Cc: V4L-DVB Maintainers, Akinobu Mita, Mauro Carvalho Chehab


From: Akinobu Mita <akinobu.mita@gmail.com>

Freeing data including list_head in list_for_each() is not safe.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
---

 drivers/media/video/vivi.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/media/video/vivi.c b/drivers/media/video/vivi.c
index 474ddb7..3cead24 100644
--- a/drivers/media/video/vivi.c
+++ b/drivers/media/video/vivi.c
@@ -1363,7 +1363,9 @@ static void __exit vivi_exit(void)
 	struct vivi_dev *h;
 	struct list_head *list;
 
-	list_for_each(list,&vivi_devlist) {
+	while (!list_empty(&vivi_devlist)) {
+		list = vivi_devlist.next;
+		list_del(list);
 		h = list_entry(list, struct vivi_dev, vivi_devlist);
 		kfree (h);
 	}


^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [PATCH 20/28] V4L/DVB (4992): Fix typo in saa7134-dvb.c
  2006-12-27 16:50 [PATCH 00/28] V4L/DVB fixes Mauro Carvalho Chehab
                   ` (18 preceding siblings ...)
  2006-12-27 16:57 ` [PATCH 19/28] V4L/DVB (4991): Cafe_ccic.c: fix NULL dereference Mauro Carvalho Chehab
@ 2006-12-27 16:57 ` Mauro Carvalho Chehab
  2006-12-27 16:57 ` [PATCH 21/28] V4L/DVB (4994): Vivi: fix use after free in list_for_each() Mauro Carvalho Chehab
                   ` (7 subsequent siblings)
  27 siblings, 0 replies; 29+ messages in thread
From: Mauro Carvalho Chehab @ 2006-12-27 16:57 UTC (permalink / raw)
  To: LKML; +Cc: V4L-DVB Maintainers, Stephan Berberig, Mauro Carvalho Chehab


From: Stephan Berberig <s.berberig@arcor.de>

Fix a typo (use_frontent -> use_frontend) in saa7134-dvb.c.

Signed-off-by: Stephan Berberig <s.berberig@arcor.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
---

 drivers/media/video/saa7134/saa7134-dvb.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/media/video/saa7134/saa7134-dvb.c b/drivers/media/video/saa7134/saa7134-dvb.c
index fa83398..c33f6a6 100644
--- a/drivers/media/video/saa7134/saa7134-dvb.c
+++ b/drivers/media/video/saa7134/saa7134-dvb.c
@@ -50,9 +50,9 @@ static unsigned int antenna_pwr = 0;
 module_param(antenna_pwr, int, 0444);
 MODULE_PARM_DESC(antenna_pwr,"enable antenna power (Pinnacle 300i)");
 
-static int use_frontent = 0;
-module_param(use_frontent, int, 0644);
-MODULE_PARM_DESC(use_frontent,"for cards with multiple frontends (0: terrestrial, 1: satellite)");
+static int use_frontend = 0;
+module_param(use_frontend, int, 0644);
+MODULE_PARM_DESC(use_frontend,"for cards with multiple frontends (0: terrestrial, 1: satellite)");
 
 /* ------------------------------------------------------------------ */
 static int pinnacle_antenna_pwr(struct saa7134_dev *dev, int on)
@@ -1303,7 +1303,7 @@ static int dvb_init(struct saa7134_dev *
 		}
 		break;
 	case SAA7134_BOARD_FLYDVB_TRIO:
-		if(! use_frontent) {	//terrestrial
+		if(! use_frontend) {	//terrestrial
 			dev->dvb.frontend = dvb_attach(tda10046_attach,
 						       &lifeview_trio_config,
 						       &dev->i2c_adap);


^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [PATCH 22/28] V4L/DVB (4995): Vivi: fix kthread_run() error check
  2006-12-27 16:50 [PATCH 00/28] V4L/DVB fixes Mauro Carvalho Chehab
                   ` (20 preceding siblings ...)
  2006-12-27 16:57 ` [PATCH 21/28] V4L/DVB (4994): Vivi: fix use after free in list_for_each() Mauro Carvalho Chehab
@ 2006-12-27 16:57 ` Mauro Carvalho Chehab
  2006-12-27 16:57 ` [PATCH 25/28] V4L/DVB (5014): Allyesconfig build fixes on some non x86 arch Mauro Carvalho Chehab
                   ` (5 subsequent siblings)
  27 siblings, 0 replies; 29+ messages in thread
From: Mauro Carvalho Chehab @ 2006-12-27 16:57 UTC (permalink / raw)
  To: LKML; +Cc: V4L-DVB Maintainers, Akinobu Mita, Mauro Carvalho Chehab


From: Akinobu Mita <akinobu.mita@gmail.com>

The return value of kthread_run() should be checked by IS_ERR().

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
---

 drivers/media/video/vivi.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/media/video/vivi.c b/drivers/media/video/vivi.c
index 3cead24..bacb311 100644
--- a/drivers/media/video/vivi.c
+++ b/drivers/media/video/vivi.c
@@ -535,9 +535,9 @@ static int vivi_start_thread(struct vivi
 
 	dma_q->kthread = kthread_run(vivi_thread, dma_q, "vivi");
 
-	if (dma_q->kthread == NULL) {
+	if (IS_ERR(dma_q->kthread)) {
 		printk(KERN_ERR "vivi: kernel_thread() failed\n");
-		return -EINVAL;
+		return PTR_ERR(dma_q->kthread);
 	}
 	dprintk(1,"returning from %s\n",__FUNCTION__);
 	return 0;


^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [PATCH 28/28] V4L/DVB (5010): Cx88: Fix leadtek_eeprom tagging
  2006-12-27 16:50 [PATCH 00/28] V4L/DVB fixes Mauro Carvalho Chehab
                   ` (24 preceding siblings ...)
  2006-12-27 16:57 ` [PATCH 24/28] V4L/DVB (4997): Bttv: delete duplicated ioremap() Mauro Carvalho Chehab
@ 2006-12-27 16:57 ` Mauro Carvalho Chehab
  2006-12-27 16:57 ` [PATCH 26/28] V4L/DVB (5001): Add two required headers on kernel 2.6.20-rc1 Mauro Carvalho Chehab
  2006-12-27 16:57 ` [PATCH 27/28] V4L/DVB (5012): Usbvision fix: It was using "&&" instead "&" Mauro Carvalho Chehab
  27 siblings, 0 replies; 29+ messages in thread
From: Mauro Carvalho Chehab @ 2006-12-27 16:57 UTC (permalink / raw)
  To: LKML
  Cc: V4L-DVB Maintainers, Jean Delvare, Michael Krufky, Mauro Carvalho Chehab


From: Jean Delvare <khali@linux-fr.org>

reference to .init.text: from .text between 'cx88_card_setup'
(at offset 0x68c) and 'cx88_risc_field'
Caused by leadtek_eeprom() being declared __devinit and called from
a non-devinit context.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
---

 drivers/media/video/cx88/cx88-cards.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/media/video/cx88/cx88-cards.c b/drivers/media/video/cx88/cx88-cards.c
index c791708..434b78a 100644
--- a/drivers/media/video/cx88/cx88-cards.c
+++ b/drivers/media/video/cx88/cx88-cards.c
@@ -1632,7 +1632,7 @@ const unsigned int cx88_idcount = ARRAY_
 /* ----------------------------------------------------------------------- */
 /* some leadtek specific stuff                                             */
 
-static void __devinit leadtek_eeprom(struct cx88_core *core, u8 *eeprom_data)
+static void leadtek_eeprom(struct cx88_core *core, u8 *eeprom_data)
 {
 	/* This is just for the "Winfast 2000XP Expert" board ATM; I don't have data on
 	 * any others.


^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [PATCH 27/28] V4L/DVB (5012): Usbvision fix: It was using "&&" instead "&"
  2006-12-27 16:50 [PATCH 00/28] V4L/DVB fixes Mauro Carvalho Chehab
                   ` (26 preceding siblings ...)
  2006-12-27 16:57 ` [PATCH 26/28] V4L/DVB (5001): Add two required headers on kernel 2.6.20-rc1 Mauro Carvalho Chehab
@ 2006-12-27 16:57 ` Mauro Carvalho Chehab
  27 siblings, 0 replies; 29+ messages in thread
From: Mauro Carvalho Chehab @ 2006-12-27 16:57 UTC (permalink / raw)
  To: LKML; +Cc: V4L-DVB Maintainers, Alexey Dobriyan, Mauro Carvalho Chehab


From: Alexey Dobriyan <adobriyan@gmail.com>

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
---

 drivers/media/video/usbvision/usbvision-core.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/media/video/usbvision/usbvision-core.c b/drivers/media/video/usbvision/usbvision-core.c
index 68542f2..a807d97 100644
--- a/drivers/media/video/usbvision/usbvision-core.c
+++ b/drivers/media/video/usbvision/usbvision-core.c
@@ -2311,7 +2311,7 @@ int usbvision_restart_isoc(struct usb_us
 				  usbvision->Vin_Reg2_Preset)) < 0) return ret;
 
 	/* TODO: schedule timeout */
-	while ((usbvision_read_reg(usbvision, USBVISION_STATUS_REG) && 0x01) != 1);
+	while ((usbvision_read_reg(usbvision, USBVISION_STATUS_REG) & 0x01) != 1);
 
 	return 0;
 }


^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [PATCH 24/28] V4L/DVB (4997): Bttv: delete duplicated ioremap()
  2006-12-27 16:50 [PATCH 00/28] V4L/DVB fixes Mauro Carvalho Chehab
                   ` (23 preceding siblings ...)
  2006-12-27 16:57 ` [PATCH 23/28] V4L/DVB (4996): Msp3400: fix kthread_run error check Mauro Carvalho Chehab
@ 2006-12-27 16:57 ` Mauro Carvalho Chehab
  2006-12-27 16:57 ` [PATCH 28/28] V4L/DVB (5010): Cx88: Fix leadtek_eeprom tagging Mauro Carvalho Chehab
                   ` (2 subsequent siblings)
  27 siblings, 0 replies; 29+ messages in thread
From: Mauro Carvalho Chehab @ 2006-12-27 16:57 UTC (permalink / raw)
  To: LKML; +Cc: V4L-DVB Maintainers, Akinobu Mita, Mauro Carvalho Chehab


From: Akinobu Mita <akinobu.mita@gmail.com>

ioremap() is called twice to same resource.
The returen value of first one is not error-checked.
second one is complely ignored.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
---

 drivers/media/video/bt8xx/bttv-driver.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/media/video/bt8xx/bttv-driver.c b/drivers/media/video/bt8xx/bttv-driver.c
index 3c8e474..ab8f970 100644
--- a/drivers/media/video/bt8xx/bttv-driver.c
+++ b/drivers/media/video/bt8xx/bttv-driver.c
@@ -4050,8 +4050,8 @@ static int __devinit bttv_probe(struct p
 	       (unsigned long long)pci_resource_start(dev,0));
 	schedule();
 
-	btv->bt848_mmio=ioremap(pci_resource_start(dev,0), 0x1000);
-	if (NULL == ioremap(pci_resource_start(dev,0), 0x1000)) {
+	btv->bt848_mmio = ioremap(pci_resource_start(dev, 0), 0x1000);
+	if (NULL == btv->bt848_mmio) {
 		printk("bttv%d: ioremap() failed\n", btv->c.nr);
 		result = -EIO;
 		goto fail1;


^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [PATCH 23/28] V4L/DVB (4996): Msp3400: fix kthread_run error check
  2006-12-27 16:50 [PATCH 00/28] V4L/DVB fixes Mauro Carvalho Chehab
                   ` (22 preceding siblings ...)
  2006-12-27 16:57 ` [PATCH 25/28] V4L/DVB (5014): Allyesconfig build fixes on some non x86 arch Mauro Carvalho Chehab
@ 2006-12-27 16:57 ` Mauro Carvalho Chehab
  2006-12-27 16:57 ` [PATCH 24/28] V4L/DVB (4997): Bttv: delete duplicated ioremap() Mauro Carvalho Chehab
                   ` (3 subsequent siblings)
  27 siblings, 0 replies; 29+ messages in thread
From: Mauro Carvalho Chehab @ 2006-12-27 16:57 UTC (permalink / raw)
  To: LKML; +Cc: V4L-DVB Maintainers, Akinobu Mita, Mauro Carvalho Chehab


From: Akinobu Mita <akinobu.mita@gmail.com>

The return value of kthread_run() should be checked by IS_ERR().

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
---

 drivers/media/video/msp3400-driver.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/media/video/msp3400-driver.c b/drivers/media/video/msp3400-driver.c
index 295cb99..2fb9fe6 100644
--- a/drivers/media/video/msp3400-driver.c
+++ b/drivers/media/video/msp3400-driver.c
@@ -949,7 +949,7 @@ static int msp_attach(struct i2c_adapter
 	if (thread_func) {
 		state->kthread = kthread_run(thread_func, client, "msp34xx");
 
-		if (state->kthread == NULL)
+		if (IS_ERR(state->kthread))
 			v4l_warn(client, "kernel_thread() failed\n");
 		msp_wake_thread(client);
 	}


^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [PATCH 25/28] V4L/DVB (5014): Allyesconfig build fixes on some non x86 arch
  2006-12-27 16:50 [PATCH 00/28] V4L/DVB fixes Mauro Carvalho Chehab
                   ` (21 preceding siblings ...)
  2006-12-27 16:57 ` [PATCH 22/28] V4L/DVB (4995): Vivi: fix kthread_run() error check Mauro Carvalho Chehab
@ 2006-12-27 16:57 ` Mauro Carvalho Chehab
  2006-12-27 16:57 ` [PATCH 23/28] V4L/DVB (4996): Msp3400: fix kthread_run error check Mauro Carvalho Chehab
                   ` (4 subsequent siblings)
  27 siblings, 0 replies; 29+ messages in thread
From: Mauro Carvalho Chehab @ 2006-12-27 16:57 UTC (permalink / raw)
  To: LKML
  Cc: V4L-DVB Maintainers, David Brownell, David Brownell,
	Mauro Carvalho Chehab


From: David Brownell <david-b@pacbell.net>

- CAFE_CCIC needs to depend on PCI, else "allyesconfig" breaks
   on systems without PCI
- em28xx-video can't udelay(2500) else "allyesconfig" breaks
   on systems that refuse to spin that long (I saw it on ARM)

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
---

 drivers/media/video/Kconfig               |    2 +-
 drivers/media/video/em28xx/em28xx-video.c |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/media/video/Kconfig b/drivers/media/video/Kconfig
index 29a11c1..57357db 100644
--- a/drivers/media/video/Kconfig
+++ b/drivers/media/video/Kconfig
@@ -668,7 +668,7 @@ config VIDEO_M32R_AR_M64278
 
 config VIDEO_CAFE_CCIC
 	tristate "Marvell 88ALP01 (Cafe) CMOS Camera Controller support"
-	depends on I2C && VIDEO_V4L2
+	depends on PCI && I2C && VIDEO_V4L2
 	select VIDEO_OV7670
 	---help---
 	  This is a video4linux2 driver for the Marvell 88ALP01 integrated
diff --git a/drivers/media/video/em28xx/em28xx-video.c b/drivers/media/video/em28xx/em28xx-video.c
index 2a461dd..36e72c2 100644
--- a/drivers/media/video/em28xx/em28xx-video.c
+++ b/drivers/media/video/em28xx/em28xx-video.c
@@ -1674,9 +1674,9 @@ #endif
 	if (dev->has_msp34xx) {
 		/* Send a reset to other chips via gpio */
 		em28xx_write_regs_req(dev, 0x00, 0x08, "\xf7", 1);
-		udelay(2500);
+		msleep(3);
 		em28xx_write_regs_req(dev, 0x00, 0x08, "\xff", 1);
-		udelay(2500);
+		msleep(3);
 
 	}
 	video_mux(dev, 0);


^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [PATCH 26/28] V4L/DVB (5001): Add two required headers on kernel 2.6.20-rc1
  2006-12-27 16:50 [PATCH 00/28] V4L/DVB fixes Mauro Carvalho Chehab
                   ` (25 preceding siblings ...)
  2006-12-27 16:57 ` [PATCH 28/28] V4L/DVB (5010): Cx88: Fix leadtek_eeprom tagging Mauro Carvalho Chehab
@ 2006-12-27 16:57 ` Mauro Carvalho Chehab
  2006-12-27 16:57 ` [PATCH 27/28] V4L/DVB (5012): Usbvision fix: It was using "&&" instead "&" Mauro Carvalho Chehab
  27 siblings, 0 replies; 29+ messages in thread
From: Mauro Carvalho Chehab @ 2006-12-27 16:57 UTC (permalink / raw)
  To: LKML; +Cc: V4L-DVB Maintainers, Mauro Carvalho Chehab


From: Mauro Carvalho Chehab <mchehab@infradead.org>

include/media/ir-common.h:78: error: field 'work' has incomplete type
drivers/media/common/ir-functions.c: In function 'ir_rc5_timer_end':
drivers/media/common/ir-functions.c:301: error: 'jiffies' undeclared (first use in this function)
drivers/media/common/ir-functions.c:301: error: (Each undeclared identifier is reported only once)
drivers/media/common/ir-functions.c:301: error: for each function it appears in.)
drivers/media/common/ir-functions.c:347: error: 'HZ' undeclared (first use in this function)

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
---

 drivers/media/common/ir-functions.c |    1 +
 include/media/ir-common.h           |    1 +
 2 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/media/common/ir-functions.c b/drivers/media/common/ir-functions.c
index 8eaa88f..9a8dd87 100644
--- a/drivers/media/common/ir-functions.c
+++ b/drivers/media/common/ir-functions.c
@@ -23,6 +23,7 @@
 #include <linux/module.h>
 #include <linux/moduleparam.h>
 #include <linux/string.h>
+#include <linux/jiffies.h>
 #include <media/ir-common.h>
 
 /* -------------------------------------------------------------------------- */
diff --git a/include/media/ir-common.h b/include/media/ir-common.h
index 2b25f5c..4bb0ad8 100644
--- a/include/media/ir-common.h
+++ b/include/media/ir-common.h
@@ -24,6 +24,7 @@ #ifndef _IR_COMMON
 #define _IR_COMMON
 
 #include <linux/input.h>
+#include <linux/workqueue.h>
 
 #define IR_TYPE_RC5     1
 #define IR_TYPE_PD      2 /* Pulse distance encoded IR */


^ permalink raw reply related	[flat|nested] 29+ messages in thread

end of thread, other threads:[~2006-12-27 17:17 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-12-27 16:50 [PATCH 00/28] V4L/DVB fixes Mauro Carvalho Chehab
2006-12-27 16:57 ` [PATCH 05/28] V4L/DVB (4960): Removal of unused code from usbvision-i2c.c Mauro Carvalho Chehab
2006-12-27 16:57 ` [PATCH 01/28] V4L/DVB (4955): Fix autosearch index Mauro Carvalho Chehab
2006-12-27 16:57 ` [PATCH 03/28] V4L/DVB (4958): Fix namespace conflict between w9968cf.c on MIPS Mauro Carvalho Chehab
2006-12-27 16:57 ` [PATCH 04/28] V4L/DVB (4959): Usbvision: possible cleanups Mauro Carvalho Chehab
2006-12-27 16:57 ` [PATCH 02/28] V4L/DVB (4956): [NOVA-T-USB2] Put remote-debugging in the right place Mauro Carvalho Chehab
2006-12-27 16:57 ` [PATCH 08/28] V4L/DVB (4968): Add PAL-60 support for cx2584x Mauro Carvalho Chehab
2006-12-27 16:57 ` [PATCH 06/28] V4L/DVB (4964): VIDEO_PALETTE_YUYV and VIDEO_PALETTE_YUV422 are the same palette Mauro Carvalho Chehab
2006-12-27 16:57 ` [PATCH 09/28] V4L/DVB (4970): Usbvision memory fixes Mauro Carvalho Chehab
2006-12-27 16:57 ` [PATCH 07/28] V4L/DVB (4967): Add missing tuner module option pal=60 for PAL-60 support Mauro Carvalho Chehab
2006-12-27 16:57 ` [PATCH 11/28] V4L/DVB (4973): Dvb-core: fix printk type warning Mauro Carvalho Chehab
2006-12-27 16:57 ` [PATCH 13/28] V4L/DVB (4980): Fixes bug 7267: PAL/60 is not working Mauro Carvalho Chehab
2006-12-27 16:57 ` [PATCH 12/28] V4L/DVB (4979): Fixes compilation when CONFIG_V4L1_COMPAT is not selected Mauro Carvalho Chehab
2006-12-27 16:57 ` [PATCH 10/28] V4L/DVB (4972): Dvb-core: fix bug in CRC-32 checking on 64-bit systems Mauro Carvalho Chehab
2006-12-27 16:57 ` [PATCH 18/28] V4L/DVB (4990): Cpia2/cpia2_usb.c: fix error-path leak Mauro Carvalho Chehab
2006-12-27 16:57 ` [PATCH 14/28] V4L/DVB (4982): Fix broken audio mode handling for line-in in msp3400 Mauro Carvalho Chehab
2006-12-27 16:57 ` [PATCH 15/28] V4L/DVB (4983): Force temporal filter to 0 when scaling to prevent ghosting Mauro Carvalho Chehab
2006-12-27 16:57 ` [PATCH 17/28] V4L/DVB (4988): Cx2341x audio_properties is an u16, not u8 Mauro Carvalho Chehab
2006-12-27 16:57 ` [PATCH 16/28] V4L/DVB (4984): LOG_STATUS should show the real temporal filter value Mauro Carvalho Chehab
2006-12-27 16:57 ` [PATCH 19/28] V4L/DVB (4991): Cafe_ccic.c: fix NULL dereference Mauro Carvalho Chehab
2006-12-27 16:57 ` [PATCH 20/28] V4L/DVB (4992): Fix typo in saa7134-dvb.c Mauro Carvalho Chehab
2006-12-27 16:57 ` [PATCH 21/28] V4L/DVB (4994): Vivi: fix use after free in list_for_each() Mauro Carvalho Chehab
2006-12-27 16:57 ` [PATCH 22/28] V4L/DVB (4995): Vivi: fix kthread_run() error check Mauro Carvalho Chehab
2006-12-27 16:57 ` [PATCH 25/28] V4L/DVB (5014): Allyesconfig build fixes on some non x86 arch Mauro Carvalho Chehab
2006-12-27 16:57 ` [PATCH 23/28] V4L/DVB (4996): Msp3400: fix kthread_run error check Mauro Carvalho Chehab
2006-12-27 16:57 ` [PATCH 24/28] V4L/DVB (4997): Bttv: delete duplicated ioremap() Mauro Carvalho Chehab
2006-12-27 16:57 ` [PATCH 28/28] V4L/DVB (5010): Cx88: Fix leadtek_eeprom tagging Mauro Carvalho Chehab
2006-12-27 16:57 ` [PATCH 26/28] V4L/DVB (5001): Add two required headers on kernel 2.6.20-rc1 Mauro Carvalho Chehab
2006-12-27 16:57 ` [PATCH 27/28] V4L/DVB (5012): Usbvision fix: It was using "&&" instead "&" Mauro Carvalho Chehab

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).