diff -uprNX dontdiff 2.6-zoran-inc/drivers/media/video/zr36120.c 2.6-zoran/drivers/media/video/zr36120.c
--- 2.6-zoran-inc/drivers/media/video/zr36120.c	2004-07-14 13:47:23.000000000 -0300
+++ 2.6-zoran/drivers/media/video/zr36120.c	2004-07-14 13:48:01.000000000 -0300
@@ -52,10 +52,10 @@
 #endif
 
 /* Anybody who uses more than four? */
-#define ZORAN_MAX 4
+#define ZR36120_MAX 4
 
 static unsigned int triton1=0;			/* triton1 chipset? */
-static unsigned int cardtype[ZORAN_MAX]={ [ 0 ... ZORAN_MAX-1 ] = CARDTYPE };
+static unsigned int cardtype[ZR36120_MAX]={ [ 0 ... ZR36120_MAX-1 ] = CARDTYPE };
 static int video_nr = -1;
 static int vbi_nr = -1;
 
@@ -71,12 +71,13 @@ MODULE_DESCRIPTION("Zoran ZR36120 based 
 MODULE_LICENSE("GPL");
 
 MODULE_PARM(triton1,"i");
-MODULE_PARM(cardtype,"1-" __MODULE_STRING(ZORAN_MAX) "i");
+MODULE_PARM(cardtype,"1-" __MODULE_STRING(ZR36120_MAX) "i");
 MODULE_PARM(video_nr,"i");
 MODULE_PARM(vbi_nr,"i");
 
-static int zoran_cards;
-static struct zoran zorans[ZORAN_MAX];
+static char *zr36120_name = "zr36120";
+static int zr36120_ncards;
+static struct zr36120 zr36120_cards[ZR36120_MAX];
 
 /*
  * the meaning of each element can be found in zr36120.h
@@ -115,18 +116,18 @@ static struct tvcard tvcards[] = {
 #ifdef __BIG_ENDIAN
 #define	ENDIANESS	0
 #else
-#define	ENDIANESS	ZORAN_VFEC_LE
+#define	ENDIANESS	ZR36120_VFEC_LE
 #endif
 
 static struct { const char name[8]; uint mode; uint bpp; } palette2fmt[] = {
 /* n/a     */	{ "n/a",     0, 0 },
 /* GREY    */	{ "GRAY",    0, 0 },
 /* HI240   */	{ "HI240",   0, 0 },
-/* RGB565  */	{ "RGB565",  ZORAN_VFEC_RGB_RGB565|ENDIANESS, 2 },
-/* RGB24   */	{ "RGB24",   ZORAN_VFEC_RGB_RGB888|ENDIANESS|ZORAN_VFEC_PACK24, 3 },
-/* RGB32   */	{ "RGB32",   ZORAN_VFEC_RGB_RGB888|ENDIANESS, 4 },
-/* RGB555  */	{ "RGB555",  ZORAN_VFEC_RGB_RGB555|ENDIANESS, 2 },
-/* YUV422  */	{ "YUV422",  ZORAN_VFEC_RGB_YUV422|ENDIANESS, 2 },
+/* RGB565  */	{ "RGB565",  ZR36120_VFEC_RGB_RGB565|ENDIANESS, 2 },
+/* RGB24   */	{ "RGB24",   ZR36120_VFEC_RGB_RGB888|ENDIANESS|ZR36120_VFEC_PACK24, 3 },
+/* RGB32   */	{ "RGB32",   ZR36120_VFEC_RGB_RGB888|ENDIANESS, 4 },
+/* RGB555  */	{ "RGB555",  ZR36120_VFEC_RGB_RGB555|ENDIANESS, 2 },
+/* YUV422  */	{ "YUV422",  ZR36120_VFEC_RGB_YUV422|ENDIANESS, 2 },
 /* YUYV    */	{ "YUYV",    0, 0 },
 /* UYVY    */	{ "UYVY",    0, 0 },
 /* YUV420  */	{ "YUV420",  0, 0 },
@@ -138,7 +139,7 @@ static struct { const char name[8]; uint
 #undef ENDIANESS
 
 /* ----------------------------------------------------------------------- */
-/* ZORAN chipset detector                                                 */
+/* ZR36120 chipset detector                                                 */
 /* shamelessly stolen from bttv.c                                         */
 /* Reason for beeing here: we need to detect if we are running on a        */
 /* Triton based chipset, and if so, enable a certain bit                   */
@@ -150,20 +151,21 @@ void __init handle_chipset(void)
 
 	/* Just in case some nut set this to something dangerous */
 	if (triton1)
-		triton1 = ZORAN_VDC_TRICOM;
+		triton1 = ZR36120_VDC_TRICOM;
 
 	while ((dev = pci_find_device(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82437, dev)))
 	{
-		printk(KERN_INFO "zoran: Host bridge 82437FX Triton PIIX\n");
-		triton1 = ZORAN_VDC_TRICOM;
+		printk(KERN_INFO "%s: Host bridge 82437FX Triton PIIX\n",
+				zr36120_name);
+		triton1 = ZR36120_VDC_TRICOM;
 	}
 }
 
 /* ----------------------------------------------------------------------- */
-/* ZORAN functions							   */
+/* ZR36120 functions							   */
 /* ----------------------------------------------------------------------- */
 
-static void zoran_set_geo(struct zoran* ztv, struct vidinfo* i);
+static void zr36120_set_geo(struct zr36120* ztv, struct vidinfo* i);
 
 #if 0 /* unused */
 static
@@ -185,7 +187,7 @@ void zoran_dump(struct zoran *ztv)
 #endif /* unused */
 
 static
-void reap_states(struct zoran* ztv)
+void reap_states(struct zr36120* ztv)
 {
 	/* count frames */
 	ztv->fieldnr++;
@@ -195,12 +197,12 @@ void reap_states(struct zoran* ztv)
 	 * This depends on if there is a workqueue AND the
 	 * videotransfer is enabled on the chip...
 	 */
-	if (ztv->workqueue && (zrread(ZORAN_VDC) & ZORAN_VDC_VIDEN))
+	if (ztv->workqueue && (zrread(ZR36120_VDC) & ZR36120_VDC_VIDEN))
 	{
 		struct vidinfo* newitem;
 
 		/* did we get a complete frame? */
-		if (zrread(ZORAN_VSTR) & ZORAN_VSTR_GRAB)
+		if (zrread(ZR36120_VSTR) & ZR36120_VSTR_GRAB)
 			return;
 
 DEBUG(printk(CARD_DEBUG "completed %s at %p\n",CARD,ztv->workqueue->kindof==FBUFFER_GRAB?"grab":"read",ztv->workqueue));
@@ -243,18 +245,18 @@ DEBUG(printk(CARD_DEBUG "starting %s at 
 
 		/* loadup the frame settings */
 		read_lock(&ztv->lock);
-		zoran_set_geo(ztv,ztv->workqueue);
+		zr36120_set_geo(ztv,ztv->workqueue);
 		read_unlock(&ztv->lock);
 
 		switch (ztv->workqueue->kindof) {
 		 case FBUFFER_GRAB:
 		 case FBUFFER_VBI:
-			zrand(~ZORAN_OCR_OVLEN, ZORAN_OCR);
-			zror(ZORAN_VSTR_SNAPSHOT,ZORAN_VSTR);
-			zror(ZORAN_VDC_VIDEN,ZORAN_VDC);
+			zrand(~ZR36120_OCR_OVLEN, ZR36120_OCR);
+			zror(ZR36120_VSTR_SNAPSHOT, ZR36120_VSTR);
+			zror(ZR36120_VDC_VIDEN, ZR36120_VDC);
 
 			/* start single-shot grab */
-			zror(ZORAN_VSTR_GRAB, ZORAN_VSTR);
+			zror(ZR36120_VSTR_GRAB, ZR36120_VSTR);
 			break;
 		 default:
 			printk(CARD_INFO "what is this doing on the queue? (kindof=%d)\n",CARD,ztv->workqueue->kindof);
@@ -280,24 +282,24 @@ DEBUG(printk(CARD_DEBUG "nothing in queu
 	if (test_bit(STATE_OVERLAY, &ztv->state))
 	{
 		/* are we already overlaying? */
-		if (!(zrread(ZORAN_OCR) & ZORAN_OCR_OVLEN) ||
-		    !(zrread(ZORAN_VDC) & ZORAN_VDC_VIDEN))
+		if (!(zrread(ZR36120_OCR) & ZR36120_OCR_OVLEN) ||
+		    !(zrread(ZR36120_VDC) & ZR36120_VDC_VIDEN))
 		{
 DEBUG(printk(CARD_DEBUG "starting overlay\n",CARD));
 
 			read_lock(&ztv->lock);
-			zoran_set_geo(ztv,&ztv->overinfo);
+			zr36120_set_geo(ztv,&ztv->overinfo);
 			read_unlock(&ztv->lock);
 
-			zror(ZORAN_OCR_OVLEN, ZORAN_OCR);
-			zrand(~ZORAN_VSTR_SNAPSHOT,ZORAN_VSTR);
-			zror(ZORAN_VDC_VIDEN,ZORAN_VDC);
+			zror(ZR36120_OCR_OVLEN, ZR36120_OCR);
+			zrand(~ZR36120_VSTR_SNAPSHOT, ZR36120_VSTR);
+			zror(ZR36120_VDC_VIDEN, ZR36120_VDC);
 		}
 
 		/*
 		 * leave overlaying on, but turn interrupts off.
 		 */
-		zrand(~ZORAN_ICR_EN,ZORAN_ICR);
+		zrand(~ZR36120_ICR_EN, ZR36120_ICR);
 		return;
 	}
 
@@ -312,7 +314,7 @@ DEBUG(printk(CARD_DEBUG "starting overla
 		lastitem = ztv->workqueue;
 		if (lastitem)
 			while (lastitem->next) lastitem = lastitem->next;
-		for (item=ztv->readinfo; item!=ztv->readinfo+ZORAN_VBI_BUFFERS; item++)
+		for (item=ztv->readinfo; item!=ztv->readinfo+ ZR36120_VBI_BUFFERS; item++)
 			if (item->next == 0 && item->status == FBUFFER_FREE)
 			{
 DEBUG(printk(CARD_DEBUG "%p added to queue\n",CARD,item));
@@ -333,39 +335,39 @@ DEBUG(printk(CARD_DEBUG "%p added to que
 	 */
 DEBUG(printk(CARD_DEBUG "turning off\n",CARD));
 	/* nothing further to do, disable DMA and further IRQs */
-	zrand(~ZORAN_VDC_VIDEN,ZORAN_VDC);
-	zrand(~ZORAN_ICR_EN,ZORAN_ICR);
+	zrand(~ZR36120_VDC_VIDEN, ZR36120_VDC);
+	zrand(~ZR36120_ICR_EN, ZR36120_ICR);
 }
 
 static
-irqreturn_t zoran_irq(int irq, void *dev_id, struct pt_regs * regs)
+irqreturn_t zr36120_irq(int irq, void *dev_id, struct pt_regs * regs)
 {
 	u32 stat,estat;
 	int count = 0;
-	struct zoran *ztv = (struct zoran *)dev_id;
+	struct zr36120 *ztv = (struct zr36120 *)dev_id;
 
 	UNUSED(irq); UNUSED(regs);
 	for (;;) {
 		/* get/clear interrupt status bits */
-		stat=zrread(ZORAN_ISR);
-		estat=stat & zrread(ZORAN_ICR);
+		stat=zrread(ZR36120_ISR);
+		estat=stat & zrread(ZR36120_ICR);
 		if (!estat)
 			break;
-		zrwrite(estat,ZORAN_ISR);
+		zrwrite(estat, ZR36120_ISR);
 		IDEBUG(printk(CARD_DEBUG "estat %08x\n",CARD,estat));
 		IDEBUG(printk(CARD_DEBUG " stat %08x\n",CARD,stat));
 
-		if (estat & ZORAN_ISR_CODE)
+		if (estat & ZR36120_ISR_CODE)
 		{
 			IDEBUG(printk(CARD_DEBUG "CodReplIRQ\n",CARD));
 		}
-		if (estat & ZORAN_ISR_GIRQ0)
+		if (estat & ZR36120_ISR_GIRQ0)
 		{
 			IDEBUG(printk(CARD_DEBUG "GIRQ0\n",CARD));
 			if (!ztv->card->usegirq1)
 				reap_states(ztv);
 		}
-		if (estat & ZORAN_ISR_GIRQ1)
+		if (estat & ZR36120_ISR_GIRQ1)
 		{
 			IDEBUG(printk(CARD_DEBUG "GIRQ1\n",CARD));
 			if (ztv->card->usegirq1)
@@ -377,7 +379,7 @@ irqreturn_t zoran_irq(int irq, void *dev
 			printk(CARD_ERR "irq loop %d (%x)\n",CARD,count,estat);
 		if (count > 20)
 		{
-			zrwrite(0, ZORAN_ICR);
+			zrwrite(0, ZR36120_ICR);
 			printk(CARD_ERR "IRQ lockup, cleared int mask\n",CARD);
 		}
 	}
@@ -385,12 +387,12 @@ irqreturn_t zoran_irq(int irq, void *dev
 }
 
 static
-int zoran_muxsel(struct zoran* ztv, int channel, int norm)
+int zr36120_muxsel(struct zr36120* ztv, int channel, int norm)
 {
 	int	rv;
 
 	/* set the new video norm */
-	rv = zoran_i2c_command(ztv, DECODER_SET_NORM, &norm);
+	rv = zr36120_i2c_command(ztv, DECODER_SET_NORM, &norm);
 	if (rv)
 		return rv;
 	ztv->norm = norm;
@@ -399,15 +401,15 @@ int zoran_muxsel(struct zoran* ztv, int 
 	channel = ztv->card->video_mux[channel] & CHANNEL_MASK;
 
 	/* set the new channel */
-	rv = zoran_i2c_command(ztv, DECODER_SET_INPUT, &channel);
+	rv = zr36120_i2c_command(ztv, DECODER_SET_INPUT, &channel);
 	return rv;
 }
 
 /* Tell the interrupt handler what to to.  */
 static
-void zoran_cap(struct zoran* ztv, int on)
+void zr36120_cap(struct zr36120* ztv, int on)
 {
-DEBUG(printk(CARD_DEBUG "zoran_cap(%d) state=%x\n",CARD,on,ztv->state));
+DEBUG(printk(CARD_DEBUG "zr36120_cap(%d) state=%x\n",CARD,on,ztv->state));
 
 	if (on) {
 		ztv->running = 1;
@@ -416,14 +418,14 @@ DEBUG(printk(CARD_DEBUG "zoran_cap(%d) s
 		 * turn interrupts (back) on. The DMA will be enabled
 		 * inside the irq handler when it detects a restart.
 		 */
-		zror(ZORAN_ICR_EN,ZORAN_ICR);
+		zror(ZR36120_ICR_EN, ZR36120_ICR);
 	}
 	else {
 		/*
 		 * turn both interrupts and DMA off
 		 */
-		zrand(~ZORAN_VDC_VIDEN,ZORAN_VDC);
-		zrand(~ZORAN_ICR_EN,ZORAN_ICR);
+		zrand(~ZR36120_VDC_VIDEN, ZR36120_VDC);
+		zrand(~ZR36120_ICR_EN, ZR36120_ICR);
 
 		ztv->running = 0;
 	}
@@ -441,7 +443,7 @@ static ulong dmask[] = {
 };
 
 static
-void zoran_built_overlay(struct zoran* ztv, int count, struct video_clip *vcp)
+void zr36120_built_overlay(struct zr36120* ztv, int count, struct video_clip *vcp)
 {
 	ulong*	mtop;
 	int	ystep = (ztv->vidXshift + ztv->vidWidth+31)/32;	/* next DWORD */
@@ -515,9 +517,10 @@ DEBUG(printk(KERN_DEBUG "       %d: clip
 	}
 
 	mtop = ztv->overinfo.overlay;
-	zrwrite(virt_to_bus(mtop), ZORAN_MTOP);
-	zrwrite(virt_to_bus(mtop+ystep), ZORAN_MBOT);
-	zraor((ztv->vidInterlace*ystep)<<0,~ZORAN_OCR_MASKSTRIDE,ZORAN_OCR);
+	zrwrite(virt_to_bus(mtop), ZR36120_MTOP);
+	zrwrite(virt_to_bus(mtop+ystep), ZR36120_MBOT);
+	zraor((ztv->vidInterlace*ystep)<<0,~ZR36120_OCR_MASKSTRIDE,
+			ZR36120_OCR);
 }
 
 struct tvnorm 
@@ -552,7 +555,7 @@ static struct tvnorm tvnorms[] = {
  * follow /very/ quick when you're wrong and the chip right :)
  */
 static
-void zoran_set_geo(struct zoran* ztv, struct vidinfo* i)
+void zr36120_set_geo(struct zr36120* ztv, struct vidinfo* i)
 {
 	ulong	top, bot;
 	int	stride;
@@ -566,7 +569,7 @@ DEBUG(printk(CARD_DEBUG "set_geo(rect=(%
 	 * make sure the DMA transfers are inhibited during our
 	 * reprogramming of the chip
 	 */
-	zrand(~ZORAN_VDC_VIDEN,ZORAN_VDC);
+	zrand(~ZR36120_VDC_VIDEN, ZR36120_VDC);
 
 	maxWidth = tvnorms[ztv->norm].Wa;
 	maxHeight = tvnorms[ztv->norm].Ha/2;
@@ -574,8 +577,14 @@ DEBUG(printk(CARD_DEBUG "set_geo(rect=(%
 	maxYOffset = tvnorms[ztv->norm].VStart;
 
 	/* setup vfec register (keep ExtFl,TopField and VCLKPol settings) */
-	vfec = (zrread(ZORAN_VFEC) & (ZORAN_VFEC_EXTFL|ZORAN_VFEC_TOPFIELD|ZORAN_VFEC_VCLKPOL)) |
-	       (palette2fmt[i->format].mode & (ZORAN_VFEC_RGB|ZORAN_VFEC_ERRDIF|ZORAN_VFEC_LE|ZORAN_VFEC_PACK24));
+	vfec = (zrread(ZR36120_VFEC) & (ZR36120_VFEC_EXTFL |
+					ZR36120_VFEC_TOPFIELD | 
+					ZR36120_VFEC_VCLKPOL)) |
+	       (palette2fmt[i->format].mode &
+					(ZR36120_VFEC_RGB |
+					 ZR36120_VFEC_ERRDIF |
+					 ZR36120_VFEC_LE |
+					 ZR36120_VFEC_PACK24));
 
 	/*
 	 * Set top, bottom ptrs. Since these must be DWORD aligned,
@@ -601,8 +610,8 @@ DEBUG(printk(CARD_DEBUG "set_geo(rect=(%
 	 * (physical) line below the top line.
 	 */
 	bot = top + i->bpl;
-	zrwrite(top,ZORAN_VTOP);
-	zrwrite(bot,ZORAN_VBOT);
+	zrwrite(top, ZR36120_VTOP);
+	zrwrite(bot, ZR36120_VBOT);
 
 	/*
 	 * Make sure the winWidth is DWORD aligned too,
@@ -617,7 +626,7 @@ DEBUG(printk(KERN_DEBUG "       window-w
 	/* determine the DispMode and stride */
 	if (i->h >= 0 && i->h <= maxHeight) {
 		/* single frame grab suffices for this height. */
-		vfec |= ZORAN_VFEC_DISPMOD;
+		vfec |= ZR36120_VFEC_DISPMOD;
 		ztv->vidInterlace = 0;
 		stride = i->bpl - (winWidth*i->bpp);
 		winHeight = i->h;
@@ -637,8 +646,10 @@ DEBUG(printk(CARD_DEBUG "WARNING stride 
 		stride = 0;
 	}
 
-	zraor((winHeight<<12)|(winWidth<<0),~(ZORAN_VDC_VIDWINHT|ZORAN_VDC_VIDWINWID), ZORAN_VDC);
-	zraor(stride<<16,~ZORAN_VSTR_DISPSTRIDE,ZORAN_VSTR);
+	zraor((winHeight<<12)|(winWidth<<0),
+				~(ZR36120_VDC_VIDWINHT | ZR36120_VDC_VIDWINWID),
+				ZR36120_VDC);
+	zraor(stride<<16, ~ZR36120_VSTR_DISPSTRIDE, ZR36120_VSTR);
 
 	/* remember vidWidth, vidHeight for overlay calculations */
 	ztv->vidWidth = winWidth;
@@ -655,7 +666,9 @@ DEBUG(printk(KERN_DEBUG "       stride=%
 		int Hstart = 1;
 		int Hend = Hstart + winWidth;
 DEBUG(printk(KERN_DEBUG "       Y: scale=0, start=%d, end=%d\n", Hstart, Hend));
-		zraor((Hstart<<10)|(Hend<<0),~(ZORAN_VFEH_HSTART|ZORAN_VFEH_HEND),ZORAN_VFEH);
+		zraor((Hstart<<10)|(Hend<<0),
+				~(ZR36120_VFEH_HSTART|ZR36120_VFEH_HEND),
+				ZR36120_VFEH);
 	}
 	else {
 		int Wa = maxWidth;
@@ -673,16 +686,18 @@ DEBUG(printk(KERN_DEBUG "       Y: scale
 
 DEBUG(printk(KERN_DEBUG "       X: scale=%d, start=%d, end=%d\n", HorDcm, Hstart, Hend));
 
-		zraor((Hstart<<10)|(Hend<<0),~(ZORAN_VFEH_HSTART|ZORAN_VFEH_HEND),ZORAN_VFEH);
+		zraor((Hstart<<10)|(Hend<<0),
+				~(ZR36120_VFEH_HSTART|ZR36120_VFEH_HEND),
+				ZR36120_VFEH);
 		vfec |= HorDcm<<14;
 
 		if (HorDcm<16)
-			vfec |= ZORAN_VFEC_HFILTER_1; /* no filter */
+			vfec |= ZR36120_VFEC_HFILTER_1; /* no filter */
 		else if (HorDcm<32)
-			vfec |= ZORAN_VFEC_HFILTER_3; /* 3 tap filter */
+			vfec |= ZR36120_VFEC_HFILTER_3; /* 3 tap filter */
 		else if (HorDcm<48)
-			vfec |= ZORAN_VFEC_HFILTER_4; /* 4 tap filter */
-		else	vfec |= ZORAN_VFEC_HFILTER_5; /* 5 tap filter */
+			vfec |= ZR36120_VFEC_HFILTER_4; /* 4 tap filter */
+		else	vfec |= ZR36120_VFEC_HFILTER_5; /* 5 tap filter */
 	}
 
 	/*
@@ -695,7 +710,9 @@ DEBUG(printk(KERN_DEBUG "       X: scale
 		int Vstart = 0;
 		int Vend = Vstart + winHeight;
 DEBUG(printk(KERN_DEBUG "       Y: scale=0, start=%d, end=%d\n", Vstart, Vend));
-		zraor((Vstart<<10)|(Vend<<0),~(ZORAN_VFEV_VSTART|ZORAN_VFEV_VEND),ZORAN_VFEV);
+		zraor((Vstart<<10)|(Vend<<0),
+				~(ZR36120_VFEV_VSTART | ZR36120_VFEV_VEND),
+				ZR36120_VFEV);
 	}
 	else {
 		int Ha = maxHeight;
@@ -707,18 +724,20 @@ DEBUG(printk(KERN_DEBUG "       Y: scale
 		int Vend = Vstart + He - 1;
 
 DEBUG(printk(KERN_DEBUG "       Y: scale=%d, start=%d, end=%d\n", VerDcm, Vstart, Vend));
-		zraor((Vstart<<10)|(Vend<<0),~(ZORAN_VFEV_VSTART|ZORAN_VFEV_VEND),ZORAN_VFEV);
+		zraor((Vstart<<10)|(Vend<<0),
+				~(ZR36120_VFEV_VSTART | ZR36120_VFEV_VEND),
+				ZR36120_VFEV);
 		vfec |= VerDcm<<8;
 	}
 
 DEBUG(printk(KERN_DEBUG "       F: format=%d(=%s)\n",i->format,palette2fmt[i->format].name));
 
 	/* setup the requested format */
-	zrwrite(vfec, ZORAN_VFEC);
+	zrwrite(vfec, ZR36120_VFEC);
 }
 
 static
-void zoran_common_open(struct zoran* ztv, int flags)
+void zr36120_common_open(struct zr36120* ztv, int flags)
 {
 	UNUSED(flags);
 
@@ -736,14 +755,14 @@ void zoran_common_open(struct zoran* ztv
 	ztv->picture.brightness=128<<8;
 	ztv->picture.hue=128<<8;
 	ztv->picture.contrast=216<<7;
-	zoran_i2c_command(ztv, DECODER_SET_PICTURE, &ztv->picture);
+	zr36120_i2c_command(ztv, DECODER_SET_PICTURE, &ztv->picture);
 
 	/* default to the composite input since my camera is there */
-	zoran_muxsel(ztv, 0, VIDEO_MODE_PAL);
+	zr36120_muxsel(ztv, 0, VIDEO_MODE_PAL);
 }
 
 static
-void zoran_common_close(struct zoran* ztv)
+void zr36120_common_close(struct zr36120* ztv)
 {
 	if (--ztv->users != 0)
 		return;
@@ -752,30 +771,31 @@ void zoran_common_close(struct zoran* zt
 	/* /what/ audio? */
 
 	/* stop the chip */
-	zoran_cap(ztv, 0);
+	zr36120_cap(ztv, 0);
 }
 
 /*
  * Open a zoran card. Right now the flags are just a hack
  */
-static int zoran_open(struct inode *inode, struct file *file)
+static int zr36120_open(struct inode *inode, struct file *file)
 {
 	unsigned int minor = iminor(inode);
-	struct zoran *ztv = NULL;
+	struct zr36120 *ztv = NULL;
 	struct vidinfo* item;
 	char* pos;
 	int i, retval;
 
 	if (!try_module_get(THIS_MODULE)) {
-		printk(KERN_ERR "failed to acquire lock on myself\n");
+		printk(KERN_ERR "%s: failed to acquire lock on myself\n",
+							zr36120_name);
 		retval = -EIO;
 		goto exit;
 	}
 
 	/* find the device */
-	for (i = 0; i < zoran_cards; i++) {
-		if (zorans[i].video_dev->minor == minor) {
-			ztv = &zorans[i];
+	for (i = 0; i < zr36120_ncards; i++) {
+		if (zr36120_cards[i].video_dev->minor == minor) {
+			ztv = &zr36120_cards[i];
 			break;
 		}
 	}
@@ -786,13 +806,15 @@ static int zoran_open(struct inode *inod
 
 	if (ztv->have_decoder &&
 			!try_module_get(ztv->decoder->driver->owner)) {
-		printk(KERN_ERR "Failed to acquire lock on TV decoder\n");
+		printk(KERN_ERR "%s: Failed to acquire lock on TV decoder\n",
+							zr36120_name);
 		retval = -EIO;
 		goto free_module;
 	}
 	if (ztv->have_tuner &&
 			!try_module_get(ztv->tuner->driver->owner)) {
-		printk(KERN_ERR "Failed to acquire lock on TV tuner\n");
+		printk(KERN_ERR "%s: Failed to acquire lock on TV tuner\n",
+							zr36120_name);
 
 		retval = -EIO;
 
@@ -806,14 +828,14 @@ static int zoran_open(struct inode *inod
 	 *********************************************/
 	/* allocate a frame buffer */
 	if (!ztv->fbuffer)
-		ztv->fbuffer = bmalloc(ZORAN_MAX_FBUFSIZE);
+		ztv->fbuffer = bmalloc(ZR36120_MAX_FBUFSIZE);
 	if (!ztv->fbuffer) {
 		/* could not get a buffer, bail out */
 		retval = -ENOBUFS;
 		goto free_tuner;
 	}
 	/* at this time we _always_ have a framebuffer */
-	memset(ztv->fbuffer,0,ZORAN_MAX_FBUFSIZE);
+	memset(ztv->fbuffer, 0, ZR36120_MAX_FBUFSIZE);
 
 	if (!ztv->overinfo.overlay)
 		ztv->overinfo.overlay = (void*)kmalloc(1024*1024/8, GFP_KERNEL);
@@ -826,16 +848,17 @@ static int zoran_open(struct inode *inod
 
 	/* clear buffer status, and give them a DMAable address */
 	pos = ztv->fbuffer;
-	for (item=ztv->grabinfo; item!=ztv->grabinfo+ZORAN_MAX_FBUFFERS; item++)
+	for (item = ztv->grabinfo; item!=ztv->grabinfo + ZR36120_MAX_FBUFFERS;
+									item++)
 	{
 		item->status = FBUFFER_FREE;
 		item->memadr = pos;
 		item->busadr = virt_to_bus(pos);
-		pos += ZORAN_MAX_FBUFFER;
+		pos += ZR36120_MAX_FBUFFER;
 	}
 
 	/* do the common part of all open's */
-	zoran_common_open(ztv, file->f_flags);
+	zr36120_common_open(ztv, file->f_flags);
 
 	file->private_data = ztv;
 
@@ -845,7 +868,7 @@ exit:
 	return retval;
 
 free_fbuffer:
-	bfree(ztv->fbuffer, ZORAN_MAX_FBUFSIZE);
+	bfree(ztv->fbuffer, ZR36120_MAX_FBUFSIZE);
 
 free_tuner:
 	if (ztv->have_tuner)
@@ -861,9 +884,9 @@ free_module:
 }
 
 static
-int zoran_close(struct inode *inode, struct file *file)
+int zr36120_close(struct inode *inode, struct file *file)
 {
-	struct zoran *ztv = (struct zoran *)file->private_data;
+	struct zr36120 *ztv = (struct zr36120 *)file->private_data;
 
 	UNUSED(inode);
 
@@ -872,7 +895,7 @@ int zoran_close(struct inode *inode, str
 	/* driver specific closure */
 	clear_bit(STATE_OVERLAY, &ztv->state);
 
-	zoran_common_close(ztv);
+	zr36120_common_close(ztv);
 	file->private_data = NULL;
 
         /*
@@ -885,7 +908,7 @@ int zoran_close(struct inode *inode, str
 
 	/* free the allocated framebuffer */
 	if (ztv->fbuffer)
-		bfree( ztv->fbuffer, ZORAN_MAX_FBUFSIZE );
+		bfree( ztv->fbuffer, ZR36120_MAX_FBUFSIZE );
 	ztv->fbuffer = 0;
 	if (ztv->overinfo.overlay)
 		kfree( ztv->overinfo.overlay );
@@ -908,9 +931,9 @@ int zoran_close(struct inode *inode, str
  * be released as soon as possible to prevent lock contention.
  */
 static
-ssize_t zoran_read(struct file *file, char* buf, size_t count, loff_t *offset)
+ssize_t zr36120_read(struct file *file, char* buf, size_t count, loff_t *offset)
 {
-	struct zoran *ztv = (struct zoran *)file->private_data;
+	struct zr36120 *ztv = (struct zr36120 *)file->private_data;
 	unsigned long max;
 	struct vidinfo* unused = 0;
 	struct vidinfo* done = 0;
@@ -918,14 +941,15 @@ ssize_t zoran_read(struct file *file, ch
 
 	UNUSED(offset);
 
-	DEBUG(printk(CARD_DEBUG "zoran_read(%p,%ld,%d)\n",CARD,buf,count,nonblock));
+	DEBUG(printk(CARD_DEBUG "zr36120_read(%p,%ld,%d)\n",CARD,buf,count,nonblock));
 
 	/* find ourself a free or completed buffer */
 	for (;;) {
 		struct vidinfo* item;
 
 		write_lock_irq(&ztv->lock);
-		for (item=ztv->grabinfo; item!=ztv->grabinfo+ZORAN_MAX_FBUFFERS; item++)
+		for (item = ztv->grabinfo;
+			item != ztv->grabinfo + ZR36120_MAX_FBUFFERS; item++)
 		{
 			if (!unused && item->status == FBUFFER_FREE)
 				unused = item;
@@ -971,7 +995,7 @@ ssize_t zoran_read(struct file *file, ch
 		write_unlock_irq(&ztv->lock);
 
 		/* tell the state machine we want it filled /NOW/ */
-		zoran_cap(ztv, 1);
+		zr36120_cap(ztv, 1);
 
 		/* wait till this buffer gets grabbed */
 		while (unused->status == FBUFFER_BUSY) {
@@ -994,42 +1018,43 @@ ssize_t zoran_read(struct file *file, ch
 
 	/* keep the engine running */
 	done->status = FBUFFER_FREE;
-//	zoran_cap(ztv,1);
+//	zr36120_cap(ztv,1);
 
 	/* tell listeners this buffer became free */
 	wake_up_interruptible(&ztv->grabq);
 
 	/* goodbye */
-	DEBUG(printk(CARD_DEBUG "zoran_read() returns %lu\n",CARD,count));
+	DEBUG(printk(CARD_DEBUG "zr36120_read() returns %lu\n",CARD,count));
 	return count;
 }
 
 static
-ssize_t zoran_write(struct file *file, const char* buf, size_t count, loff_t *offset)
+ssize_t zr36120_write(struct file *file, const char* buf, size_t count, loff_t *offset)
 {
-	struct zoran *ztv = (struct zoran *)file->private_data;
+	struct zr36120 *ztv = (struct zr36120 *)file->private_data;
 	UNUSED(ztv); UNUSED(file); UNUSED(buf); UNUSED(count); UNUSED(offset);
-	DEBUG(printk(CARD_DEBUG "zoran_write\n",CARD));
+	DEBUG(printk(CARD_DEBUG "zr36120_write\n",CARD));
 	return -EINVAL;
 }
 
 static
-unsigned int zoran_poll(struct file *file, poll_table *wait)
+unsigned int zr36120_poll(struct file *file, poll_table *wait)
 {
-	struct zoran *ztv = (struct zoran *)file->private_data;
+	struct zr36120 *ztv = (struct zr36120 *)file->private_data;
 	struct vidinfo* item;
 	unsigned int mask = 0;
 
 	poll_wait(file, &ztv->grabq, wait);
 
-	for (item=ztv->grabinfo; item!=ztv->grabinfo+ZORAN_MAX_FBUFFERS; item++)
+	for (item=ztv->grabinfo; item!=ztv->grabinfo + ZR36120_MAX_FBUFFERS;
+									item++)
 		if (item->status == FBUFFER_DONE)
 		{
 			mask |= (POLLIN | POLLRDNORM);
 			break;
 		}
 
-	DEBUG(printk(CARD_DEBUG "zoran_poll()=%x\n",CARD,mask));
+	DEBUG(printk(CARD_DEBUG "zr36120_poll()=%x\n",CARD,mask));
 
 	return mask;
 }
@@ -1046,9 +1071,9 @@ void new_clip(struct video_window* vw, s
 }
 
 static
-int zoran_do_ioctl(struct inode *inode, struct file *file, unsigned int cmd, void *arg)
+int zr36120_do_ioctl(struct inode *inode, struct file *file, unsigned int cmd, void *arg)
 {
-	struct zoran* ztv = (struct zoran *)file->private_data;
+	struct zr36120* ztv = (struct zr36120 *)file->private_data;
 
 	UNUSED(inode);
 
@@ -1144,7 +1169,7 @@ int zoran_do_ioctl(struct inode *inode, 
 			return -EOPNOTSUPP;
 
 		/* make it happen, nr1! */
-		return zoran_muxsel(ztv,v.channel,v.norm);
+		return zr36120_muxsel(ztv,v.channel,v.norm);
 	 }
 
 	 case VIDIOCGTUNER:
@@ -1187,7 +1212,7 @@ int zoran_do_ioctl(struct inode *inode, 
 			return -EOPNOTSUPP;
 
 		/* engage! */
-		return zoran_muxsel(ztv,v.tuner,v.mode);
+		return zr36120_muxsel(ztv,v.tuner,v.mode);
 	 }
 
 	 case VIDIOCGPICT:
@@ -1233,7 +1258,7 @@ int zoran_do_ioctl(struct inode *inode, 
 		write_unlock_irq(&ztv->lock);
 
 		/* tell the decoder */
-		zoran_i2c_command(ztv, DECODER_SET_PICTURE, &p);
+		zr36120_i2c_command(ztv, DECODER_SET_PICTURE, &p);
 		break;
 	 }
 
@@ -1283,7 +1308,7 @@ int zoran_do_ioctl(struct inode *inode, 
 
 		on = ztv->running;
 		if (on)
-			zoran_cap(ztv, 0);
+			zr36120_cap(ztv, 0);
 
 		/*
 		 * strange, it seems xawtv sometimes calls us with 0
@@ -1311,13 +1336,13 @@ int zoran_do_ioctl(struct inode *inode, 
 			new_clip(&vw, vcp, 0, ztv->sheight-vw.y, vw.width-1, vw.height-1);
 
 		/* built the requested clipping zones */
-		zoran_set_geo(ztv, &ztv->overinfo);
-		zoran_built_overlay(ztv, vw.clipcount, vcp);
+		zr36120_set_geo(ztv, &ztv->overinfo);
+		zr36120_built_overlay(ztv, vw.clipcount, vcp);
 		vfree(vcp);
 
 		/* if we were on, restart the video engine */
 		if (on)
-			zoran_cap(ztv, 1);
+			zr36120_cap(ztv, 1);
 		break;
 	 }
 
@@ -1330,7 +1355,7 @@ int zoran_do_ioctl(struct inode *inode, 
 
 		if (v==0) {
 			clear_bit(STATE_OVERLAY, &ztv->state);
-			zoran_cap(ztv, 1);
+			zr36120_cap(ztv, 1);
 		}
 		else {
 			/* is VIDIOCSFBUF, VIDIOCSWIN done? */
@@ -1338,7 +1363,7 @@ int zoran_do_ioctl(struct inode *inode, 
 				return -EINVAL;
 
 			set_bit(STATE_OVERLAY, &ztv->state);
-			zoran_cap(ztv, 1);
+			zr36120_cap(ztv, 1);
 		}
 		break;
 	 }
@@ -1396,7 +1421,7 @@ int zoran_do_ioctl(struct inode *inode, 
 		if (get_user(i, (int *) arg))
 			return -EFAULT;
 		DEBUG(printk(CARD_DEBUG "VIDEOCSYNC(%d)\n",CARD,i));
-		if (i<0 || i>ZORAN_MAX_FBUFFERS)
+		if (i < 0 || i > ZR36120_MAX_FBUFFERS)
 			return -EINVAL;
 		switch (ztv->grabinfo[i].status) {
 		 case FBUFFER_FREE:
@@ -1428,7 +1453,7 @@ int zoran_do_ioctl(struct inode *inode, 
 		if (copy_from_user(&vm,arg,sizeof(vm)))
 			return -EFAULT;
 		DEBUG(printk(CARD_DEBUG "VIDIOCMCAPTURE(%d,(%d,%d),%d)\n",CARD,vm.frame,vm.width,vm.height,vm.format));
-		if (vm.frame<0 || vm.frame>ZORAN_MAX_FBUFFERS ||
+		if (vm.frame < 0 || vm.frame > ZR36120_MAX_FBUFFERS ||
 		    vm.width<32 || vm.width>768 ||
 		    vm.height<32 || vm.height>576 ||
 		    vm.format>NRPALETTES ||
@@ -1458,7 +1483,7 @@ int zoran_do_ioctl(struct inode *inode, 
 		  }
 		}
 		write_unlock_irq(&ztv->lock);
-		zoran_cap(ztv, 1);
+		zr36120_cap(ztv, 1);
 		break;
 	 }
 
@@ -1467,10 +1492,10 @@ int zoran_do_ioctl(struct inode *inode, 
 		struct video_mbuf mb;
 		int i;
 		DEBUG(printk(CARD_DEBUG "VIDIOCGMBUF\n",CARD));
-		mb.size = ZORAN_MAX_FBUFSIZE;
-		mb.frames = ZORAN_MAX_FBUFFERS;
-		for (i=0; i<ZORAN_MAX_FBUFFERS; i++)
-			mb.offsets[i] = i*ZORAN_MAX_FBUFFER;
+		mb.size = ZR36120_MAX_FBUFSIZE;
+		mb.frames = ZR36120_MAX_FBUFFERS;
+		for (i = 0; i < ZR36120_MAX_FBUFFERS; i++)
+			mb.offsets[i] = i * ZR36120_MAX_FBUFFER;
 		if(copy_to_user(arg, &mb,sizeof(mb)))
 			return -EFAULT;
 		break;
@@ -1507,7 +1532,7 @@ int zoran_do_ioctl(struct inode *inode, 
 
 		if (ztv->have_tuner) {
 			int fixme = v;
-			if (zoran_i2c_command(ztv, TUNER_SET_TVFREQ, &fixme) < 0)
+			if (zr36120_i2c_command(ztv, TUNER_SET_TVFREQ, &fixme) < 0)
 				return -EAGAIN;
 		}
 		ztv->tuner_freq = v;
@@ -1532,23 +1557,23 @@ int zoran_do_ioctl(struct inode *inode, 
 	return 0;
 }
 
-static int zoran_ioctl (struct inode* inode, struct file* file, unsigned int cmd, unsigned long arg)
+static int zr36120_ioctl (struct inode* inode, struct file* file, unsigned int cmd, unsigned long arg)
 {
-	return video_usercopy(inode, file, cmd, arg, zoran_do_ioctl);
+	return video_usercopy(inode, file, cmd, arg, zr36120_do_ioctl);
 }
 
 static
-int zoran_mmap(struct file *file, struct vm_area_struct *vma)
+int zr36120_mmap(struct file *file, struct vm_area_struct *vma)
 {
-	struct zoran* ztv = (struct zoran *)file->private_data;
+	struct zr36120* ztv = (struct zr36120 *)file->private_data;
 	unsigned long start = vma->vm_start;
 	unsigned int size = (vma->vm_end - vma->vm_start);
 	unsigned long pos;
 
-	DEBUG(printk(CARD_DEBUG "zoran_mmap(0x%p,%ld)\n",CARD,adr,size));
+	DEBUG(printk(CARD_DEBUG "zr36120_mmap(0x%p,%ld)\n",CARD,adr,size));
 
 	/* sanity checks */
-	if (size > ZORAN_MAX_FBUFSIZE || !ztv->fbuffer)
+	if (size > ZR36120_MAX_FBUFSIZE || !ztv->fbuffer)
 		return -EINVAL;
 
 	/* start mapping the whole shabang to user memory */
@@ -1565,20 +1590,20 @@ int zoran_mmap(struct file *file, struct
 }
 
 static
-void zoran_vdev_release(struct video_device* vdev)
+void zr36120_vdev_release(struct video_device* vdev)
 {
 	kfree(vdev);
 }
 
-static struct file_operations zoran_fops = {
-	.open           = zoran_open,
-	.release        = zoran_close,
-	.ioctl          = zoran_ioctl,
+static struct file_operations zr36120_fops = {
+	.open           = zr36120_open,
+	.release        = zr36120_close,
+	.ioctl          = zr36120_ioctl,
 	.llseek         = no_llseek,
-	.read           = zoran_read,
-	.write          = zoran_write,
-	.mmap           = zoran_mmap,
-	.poll           = zoran_poll,
+	.read           = zr36120_read,
+	.write          = zr36120_write,
+	.mmap           = zr36120_mmap,
+	.poll           = zr36120_poll,
 };
 
 static struct video_device zr36120_template=
@@ -1587,28 +1612,29 @@ static struct video_device zr36120_templ
 	.name           = "UNSET",
 	.type           = VID_TYPE_TUNER|VID_TYPE_CAPTURE|VID_TYPE_OVERLAY,
 	.hardware       = VID_HARDWARE_ZR36120,
-	.fops           = &zoran_fops,
-	.release        = zoran_vdev_release,
+	.fops           = &zr36120_fops,
+	.release        = zr36120_vdev_release,
 	.minor		= -1,
 };
 
 static
 int vbi_open(struct inode *inode, struct file *file)
 {
-	struct zoran *ztv = NULL;
+	struct zr36120 *ztv = NULL;
 	unsigned int minor = iminor(inode);
 	struct vidinfo* item;
 	int i;
 
 	if (!try_module_get(THIS_MODULE)) {
-		printk(KERN_ERR "failed to acquire lock on myself\n");
+		printk(KERN_ERR "%s: failed to acquire lock on myself\n",
+							zr36120_name);
 		return -EIO;
 	}
 
 	/* find the device */
-	for (i = 0; i < zoran_cards; i++) {
-		if (zorans[i].video_dev->minor == minor) {
-			ztv = &zorans[i];
+	for (i = 0; i < zr36120_ncards; i++) {
+		if (zr36120_cards[i].video_dev->minor == minor) {
+			ztv = &zr36120_cards[i];
 			break;
 		}
 	}
@@ -1623,18 +1649,19 @@ int vbi_open(struct inode *inode, struct
 	 */
 
 	/* allocate buffers */
-	for (item=ztv->readinfo; item!=ztv->readinfo+ZORAN_VBI_BUFFERS; item++)
+	for (item = ztv->readinfo; item != ztv->readinfo + ZR36120_VBI_BUFFERS;
+									item++)
 	{
 		item->status = FBUFFER_FREE;
 
 		/* alloc */
 		if (!item->memadr) {
-			item->memadr = bmalloc(ZORAN_VBI_BUFSIZE);
+			item->memadr = bmalloc(ZR36120_VBI_BUFSIZE);
 			if (!item->memadr) {
 				/* could not get a buffer, bail out */
 				while (item != ztv->readinfo) {
 					item--;
-					bfree(item->memadr, ZORAN_VBI_BUFSIZE);
+					bfree(item->memadr, ZR36120_VBI_BUFSIZE);
 					item->memadr = 0;
 					item->busadr = 0;
 				}
@@ -1648,11 +1675,11 @@ int vbi_open(struct inode *inode, struct
 	}
 
 	/* do the common part of all open's */
-	zoran_common_open(ztv, file->f_flags);
+	zr36120_common_open(ztv, file->f_flags);
 
 	set_bit(STATE_VBI, &ztv->state);
 	/* start read-ahead */
-	zoran_cap(ztv, 1);
+	zr36120_cap(ztv, 1);
 
 	return 0;
 }
@@ -1660,7 +1687,7 @@ int vbi_open(struct inode *inode, struct
 static
 int vbi_close(struct inode *inode, struct file *file)
 {
-	struct zoran *ztv = (struct zoran *)file->private_data;
+	struct zr36120 *ztv = (struct zr36120 *)file->private_data;
 	struct vidinfo* item;
 
 	UNUSED(inode);
@@ -1670,7 +1697,7 @@ int vbi_close(struct inode *inode, struc
 	/* driver specific closure */
 	clear_bit(STATE_VBI, &ztv->state);
 
-	zoran_common_close(ztv);
+	zr36120_common_close(ztv);
 
         /*
          *      This is sucky but right now I can't find a good way to
@@ -1680,10 +1707,11 @@ int vbi_close(struct inode *inode, struc
         current->state = TASK_UNINTERRUPTIBLE;
         schedule_timeout(HZ/10);        /* Wait 1/10th of a second */
 
-	for (item=ztv->readinfo; item!=ztv->readinfo+ZORAN_VBI_BUFFERS; item++)
+	for (item = ztv->readinfo; item != ztv->readinfo + ZR36120_VBI_BUFFERS;
+									item++)
 	{
 		if (item->memadr)
-			bfree(item->memadr, ZORAN_VBI_BUFSIZE);
+			bfree(item->memadr, ZR36120_VBI_BUFSIZE);
 		item->memadr = 0;
 	}
 
@@ -1702,7 +1730,7 @@ int vbi_close(struct inode *inode, struc
 static
 ssize_t vbi_read(struct file *file, char* buf, size_t count, loff_t *offset)
 {
-	struct zoran *ztv = (struct zoran *)file->private_data;
+	struct zr36120 *ztv = (struct zr36120 *)file->private_data;
 	unsigned long max;
 	struct vidinfo* unused = 0;
 	struct vidinfo* done = 0;
@@ -1717,7 +1745,8 @@ ssize_t vbi_read(struct file *file, char
 		struct vidinfo* item;
 
 		write_lock_irq(&ztv->lock);
-		for (item=ztv->readinfo; item!=ztv->readinfo+ZORAN_VBI_BUFFERS; item++) {
+		for (item = ztv->readinfo;
+		     item != ztv->readinfo + ZR36120_VBI_BUFFERS; item++) {
 			if (!unused && item->status == FBUFFER_FREE)
 				unused = item;
 			if (!done && item->status == FBUFFER_DONE)
@@ -1757,7 +1786,7 @@ ssize_t vbi_read(struct file *file, char
 		write_unlock_irq(&ztv->lock);
 
 		/* tell the state machine we want it filled /NOW/ */
-		zoran_cap(ztv, 1);
+		zr36120_cap(ztv, 1);
 
 		/* wait till this buffer gets grabbed */
 		while (unused->status == FBUFFER_BUSY) {
@@ -1847,7 +1876,7 @@ ssize_t vbi_read(struct file *file, char
 
 	/* keep the engine running */
 	done->status = FBUFFER_FREE;
-	zoran_cap(ztv, 1);
+	zr36120_cap(ztv, 1);
 
 	/* tell listeners this buffer just became free */
 	wake_up_interruptible(&ztv->vbiq);
@@ -1861,13 +1890,14 @@ out:
 static
 unsigned int vbi_poll(struct file *file, poll_table *wait)
 {
-	struct zoran *ztv = (struct zoran *)file->private_data;
+	struct zr36120 *ztv = (struct zr36120 *)file->private_data;
 	struct vidinfo* item;
 	unsigned int mask = 0;
 
 	poll_wait(file, &ztv->vbiq, wait);
 
-	for (item=ztv->readinfo; item!=ztv->readinfo+ZORAN_VBI_BUFFERS; item++)
+	for (item = ztv->readinfo; item != ztv->readinfo + ZR36120_VBI_BUFFERS;
+									item++)
 		if (item->status == FBUFFER_DONE)
 		{
 			mask |= (POLLIN | POLLRDNORM);
@@ -1882,7 +1912,7 @@ unsigned int vbi_poll(struct file *file,
 static
 int vbi_do_ioctl(struct inode *inode, struct file *file, unsigned int cmd, void *arg)
 {
-	struct zoran* ztv = (struct zoran *)file->private_data;
+	struct zr36120* ztv = (struct zr36120 *)file->private_data;
 
 	UNUSED(inode);
 
@@ -1926,7 +1956,7 @@ int vbi_do_ioctl(struct inode *inode, st
 		ztv->readinfo[0].w = -f.samples_per_line;
 		ztv->readinfo[0].h = -f.count[0];
 		ztv->readinfo[0].bpl = f.samples_per_line*ztv->readinfo[0].bpp;
-		for (i=1; i<ZORAN_VBI_BUFFERS; i++)
+		for (i = 1; i < ZR36120_VBI_BUFFERS; i++)
 			ztv->readinfo[i] = ztv->readinfo[i];
 		write_unlock_irq(&ztv->lock);
 		break;
@@ -1948,7 +1978,7 @@ static struct file_operations vbi_fops =
 	.open		= vbi_open,
 	.release	= vbi_close,
 	.read		= vbi_read,
-	.write		= zoran_write,
+	.write		= zr36120_write,
 	.llseek		= no_llseek,
 	.poll		= vbi_poll,
 	.ioctl		= vbi_ioctl,
@@ -1960,7 +1990,7 @@ static struct video_device vbi_template=
 	.type		= VID_TYPE_CAPTURE|VID_TYPE_TELETEXT,
 	.hardware	= VID_HARDWARE_ZR36120,
 	.fops		= &vbi_fops,
-	.release	= zoran_vdev_release,
+	.release	= zr36120_vdev_release,
 	.minor		= -1,
 };
 
@@ -1968,82 +1998,88 @@ static struct video_device vbi_template=
  *      Scan for a Zoran chip, request the irq and map the io memory
  */
 static
-int __init find_zoran(void)
+int __init find_zr36120(void)
 {
 	int result;
-	struct zoran *ztv;
+	struct zr36120 *ztv;
 	struct pci_dev *dev = NULL;
 	unsigned char revision;
-	int zoran_num=0;
+	int zr36120_num=0;
 
 	while ((dev = pci_find_device(PCI_VENDOR_ID_ZORAN,PCI_DEVICE_ID_ZORAN_36120, dev)))
 	{
 		/* Ok, a ZR36120/ZR36125 found! */
-		ztv = &zorans[zoran_num];
+		ztv = &zr36120_cards[zr36120_num];
 		ztv->dev = dev;
 
 		if (pci_enable_device(dev))
 			return -EIO;
 
 		pci_read_config_byte(dev, PCI_CLASS_REVISION, &revision);
-		printk(KERN_INFO "zoran: Zoran %x (rev %d) ",
-			dev->device, revision);
+		printk(KERN_INFO "%s: Zoran %x (rev %d) ",
+			zr36120_name, dev->device, revision);
 		printk("bus: %d, devfn: %d, irq: %d, ",
 			dev->bus->number, dev->devfn, dev->irq);
-		printk("memory: 0x%08lx.\n", ztv->zoran_adr);
+		printk("memory: 0x%08lx.\n", ztv->zr36120_adr);
 
-		ztv->zoran_mem = ioremap(ztv->zoran_adr, 0x1000);
-		DEBUG(printk(KERN_DEBUG "zoran: mapped-memory at 0x%p\n",ztv->zoran_mem));
+		DEBUG(printk(KERN_DEBUG "%s: mapped-memory at 0x%p\n",
+			zr36120_name, ztv->zr36120_mem));
 
-		result = request_irq(dev->irq, zoran_irq,
-			SA_SHIRQ|SA_INTERRUPT,"zoran",(void *)ztv);
+		result = request_irq(dev->irq, zr36120_irq,
+			SA_SHIRQ|SA_INTERRUPT, zr36120_name, (void *)ztv);
 		if (result==-EINVAL)
 		{
-			iounmap(ztv->zoran_mem);
-			printk(KERN_ERR "zoran: Bad irq number or handler\n");
+			iounmap(ztv->zr36120_mem);
+			printk(KERN_ERR "%s: Bad irq number or handler\n",
+				zr36120_name);
 			return -EINVAL;
 		}
 		if (result==-EBUSY)
-			printk(KERN_ERR "zoran: IRQ %d busy, change your PnP config in BIOS\n",dev->irq);
+			printk(KERN_ERR "%s: IRQ %d busy, change your PnP "
+					"config in BIOS\n", zr36120_name,
+					dev->irq);
 		if (result < 0) {
-			iounmap(ztv->zoran_mem);
+			iounmap(ztv->zr36120_mem);
 			return result;
 		}
 		/* Enable bus-mastering */
 		pci_set_master(dev);
 
-		zoran_num++;
+		zr36120_num++;
 	}
-	if(zoran_num)
-		printk(KERN_INFO "zoran: %d Zoran card(s) found.\n",zoran_num);
-	return zoran_num;
+	if(zr36120_num)
+		printk(KERN_INFO "%s: %d Zoran card(s) found.\n", zr36120_name,
+				zr36120_num);
+	return zr36120_num;
 }
 
 static
-int __init init_zoran(int card)
+int __init init_zr36120(int card)
 {
-	struct zoran *ztv = &zorans[card];
+	struct zr36120 *ztv = &zr36120_cards[card];
 	int	i;
 	void *alloc_mem1, *alloc_mem2; 
 
 	/* if the given cardtype valid? */
 	if (cardtype[card]>=NRTVCARDS) {
-		printk(KERN_INFO "invalid cardtype(%d) detected\n",cardtype[card]);
+		printk(KERN_INFO "%s: invalid cardtype(%d) detected\n",
+						zr36120_name, cardtype[card]);
 		return -1;
 	}
 
 	if (!(alloc_mem1 = kmalloc(sizeof(struct video_device), GFP_KERNEL)) ||
 	    !(alloc_mem2 = kmalloc(sizeof(struct video_device), GFP_KERNEL))) {
-		printk(KERN_ERR "failed to kmalloc data for video_device entries\n");
+		printk(KERN_ERR "%s: failed to kmalloc data for video_device "
+				"entries\n", zr36120_name);
 		if (alloc_mem1)
 			kfree(alloc_mem1);
 		return -1;
 	}
 
 	/* reset the zoran */
-	zrand(~ZORAN_PCI_SOFTRESET,ZORAN_PCI);
+	zrand(~ZR36120_PCI_SOFTRESET, ZR36120_PCI);
 	udelay(10);
-	zror(ZORAN_PCI_SOFTRESET,ZORAN_PCI);
+	zror(ZR36120_PCI_SOFTRESET, ZR36120_PCI);
 	udelay(10);
 
 	/* zoran chip specific details */
@@ -2070,7 +2106,7 @@ int __init init_zoran(int card)
 	ztv->overinfo.busadr = 0;
 	ztv->overinfo.memadr = 0;
 	ztv->overinfo.overlay = 0;
-	for (i=0; i<ZORAN_MAX_FBUFFERS; i++) {
+	for (i = 0; i < ZR36120_MAX_FBUFFERS; i++) {
 		ztv->grabinfo[i] = ztv->overinfo;
 		ztv->grabinfo[i].kindof = FBUFFER_GRAB;
 	}
@@ -2084,7 +2120,7 @@ int __init init_zoran(int card)
 	ztv->readinfo[0].format = VIDEO_PALETTE_YUV422;
 	ztv->readinfo[0].bpp = palette2fmt[ztv->readinfo[0].format].bpp;
 	ztv->readinfo[0].bpl = 1024*ztv->readinfo[0].bpp;
-	for (i=1; i<ZORAN_VBI_BUFFERS; i++)
+	for (i = 1; i < ZR36120_VBI_BUFFERS; i++)
 		ztv->readinfo[i] = ztv->readinfo[0];
 	init_waitqueue_head(&ztv->vbiq);
 
@@ -2100,26 +2136,26 @@ int __init init_zoran(int card)
 	ztv->lastfieldnr = 0;
 
 	if (triton1)
-		zrand(~ZORAN_VDC_TRICOM, ZORAN_VDC);
+		zrand(~ZR36120_VDC_TRICOM, ZR36120_VDC);
 
 	/* external FL determines TOP frame */
-	zror(ZORAN_VFEC_EXTFL, ZORAN_VFEC); 
+	zror(ZR36120_VFEC_EXTFL, ZR36120_VFEC); 
 
 	/* set HSpol */
 	if (ztv->card->hsync_pos)
-		zrwrite(ZORAN_VFEH_HSPOL, ZORAN_VFEH);
+		zrwrite(ZR36120_VFEH_HSPOL, ZR36120_VFEH);
 	/* set VSpol */
 	if (ztv->card->vsync_pos)
-		zrwrite(ZORAN_VFEV_VSPOL, ZORAN_VFEV);
+		zrwrite(ZR36120_VFEV_VSPOL, ZR36120_VFEV);
 
 	/* Set the proper General Purpuse register bits */
 	/* implicit: no softreset, 0 waitstates */
-	zrwrite(ZORAN_PCI_SOFTRESET|(ztv->card->gpdir<<0),ZORAN_PCI);
+	zrwrite(ZR36120_PCI_SOFTRESET | (ztv->card->gpdir << 0), ZR36120_PCI);
 	/* implicit: 3 duration and recovery PCI clocks on guest 0-3 */
-	zrwrite(ztv->card->gpval<<24,ZORAN_GUEST);
+	zrwrite(ztv->card->gpval << 24, ZR36120_GUEST);
 
 	/* clear interrupt status */
-	zrwrite(~0, ZORAN_ISR);
+	zrwrite(~0, ZR36120_ISR);
 
 	/*
 	 * Now add the template and register the device unit
@@ -2145,44 +2181,45 @@ int __init init_zoran(int card)
 		return -1;
 	}
 	ztv->i2cbr = 0;
-	zoran_i2c_load(ztv);
+	zr36120_i2c_load(ztv);
 
 	/* set interrupt mask - the PIN enable will be set later */
-	zrwrite(ZORAN_ICR_GIRQ0|ZORAN_ICR_GIRQ1|ZORAN_ICR_CODE, ZORAN_ICR);
+	zrwrite(ZR36120_ICR_GIRQ0 | ZR36120_ICR_GIRQ1 | ZR36120_ICR_CODE,
+		ZR36120_ICR);
 
 	printk(KERN_INFO "%s: installed %s\n",ztv->i2c_adapter.name,ztv->card->name);
 	return 0;
 }
 
 static
-void release_zoran(int max)
+void release_zr36120(int max)
 {
-	struct zoran *ztv;
+	struct zr36120 *ztv;
 	int i;
 
 	for (i=0;i<max; i++) 
 	{
-		ztv = &zorans[i];
+		ztv = &zr36120_cards[i];
 
 		/* turn off all capturing, DMA and IRQs */
 		/* reset the zoran */
-		zrand(~ZORAN_PCI_SOFTRESET,ZORAN_PCI);
+		zrand(~ZR36120_PCI_SOFTRESET, ZR36120_PCI);
 		udelay(10);
-		zror(ZORAN_PCI_SOFTRESET,ZORAN_PCI);
+		zror(ZR36120_PCI_SOFTRESET, ZR36120_PCI);
 		udelay(10);
 
 		/* first disable interrupts before unmapping the memory! */
-		zrwrite(0, ZORAN_ICR);
-		zrwrite(0xffffffffUL,ZORAN_ISR);
+		zrwrite(0, ZR36120_ICR);
+		zrwrite(0xffffffffUL, ZR36120_ISR);
 
 		/* free it */
 		free_irq(ztv->dev->irq,ztv);
  
-		zoran_i2c_unload(ztv);
+		zr36120_i2c_unload(ztv);
 
 		/* unmap and free memory */
-		if (ztv->zoran_mem)
-			iounmap(ztv->zoran_mem);
+		if (ztv->zr36120_mem)
+			iounmap(ztv->zr36120_mem);
 
 		video_unregister_device(ztv->video_dev);
 		video_unregister_device(ztv->vbi_dev);
@@ -2191,7 +2228,7 @@ void release_zoran(int max)
 
 void __exit zr36120_exit(void)
 {
-	release_zoran(zoran_cards);
+	release_zr36120(zr36120_ncards);
 }
 
 int __init zr36120_init(void)
@@ -2199,16 +2236,16 @@ int __init zr36120_init(void)
 	int	card;
  
 	handle_chipset();
-	zoran_cards = find_zoran();
-	if (zoran_cards<0)
+	zr36120_ncards = find_zr36120();
+	if (zr36120_ncards<0)
 		/* no cards found, no need for a driver */
 		return -EIO;
 
 	/* initialize Zorans */
-	for (card=0; card<zoran_cards; card++) {
-		if (init_zoran(card)<0) {
+	for (card = 0; card < zr36120_ncards; card++) {
+		if (init_zr36120(card)<0) {
 			/* only release the zorans we have registered */
-			release_zoran(card);
+			release_zr36120(card);
 			return -EIO;
 		} 
 	}
diff -uprNX dontdiff 2.6-zoran-inc/drivers/media/video/zr36120.h 2.6-zoran/drivers/media/video/zr36120.h
--- 2.6-zoran-inc/drivers/media/video/zr36120.h	2004-07-14 13:47:23.000000000 -0300
+++ 2.6-zoran/drivers/media/video/zr36120.h	2004-07-14 13:48:01.000000000 -0300
@@ -40,12 +40,12 @@
 #define IDEBUG(x...)			/* Debug interrupt handler */
 #define PDEBUG		0		/* Debug PCI writes */
 
-#define	ZORAN_MAX_FBUFFERS	2
-#define	ZORAN_MAX_FBUFFER	(768*576*2)
-#define	ZORAN_MAX_FBUFSIZE	(ZORAN_MAX_FBUFFERS*ZORAN_MAX_FBUFFER)
+#define	ZR36120_MAX_FBUFFERS	2
+#define	ZR36120_MAX_FBUFFER	(768*576*2)
+#define	ZR36120_MAX_FBUFSIZE	(ZR36120_MAX_FBUFFERS * ZR36120_MAX_FBUFFER)
 
-#define	ZORAN_VBI_BUFFERS	2
-#define	ZORAN_VBI_BUFSIZE	(22*1024*2)
+#define	ZR36120_VBI_BUFFERS	2
+#define	ZR36120_VBI_BUFSIZE	(22*1024*2)
 
 struct tvcard {
 	char*	name;		/* name of the cardtype */
@@ -87,7 +87,7 @@ struct vidinfo {
 	ulong*	overlay;	/* kernel addr of overlay mask		*/
 };
 
-struct zoran 
+struct zr36120 
 {
 	struct video_device *video_dev;
 #define CARD_DEBUG	KERN_DEBUG "%s(%lu): "
@@ -103,8 +103,8 @@ struct zoran 
 	struct i2c_client* decoder,
 			* tuner;	/* pointer to the decoder+tuner */
 	struct pci_dev*	dev;		/* ptr to PCI device		*/
-	ulong		zoran_adr;	/* bus address of IO memory	*/
-	char*		zoran_mem;	/* kernel address of IO memory	*/
+	ulong		zr36120_adr;	/* bus address of IO memory	*/
+	char*		zr36120_mem;	/* kernel address of IO memory	*/
 	struct tvcard*	card;		/* the cardtype			*/
 	uint		norm;		/* 0=PAL, 1=NTSC, 2=SECAM	*/
 	uint		tuner_freq;	/* Current freq in kHz		*/
@@ -118,7 +118,7 @@ struct zoran 
 	/* State details */
 	char*		fbuffer;	/* framebuffers for mmap	*/
 	struct vidinfo	overinfo;	/* overlay data			*/
-	struct vidinfo	grabinfo[ZORAN_MAX_FBUFFERS];	/* grabbing data*/
+	struct vidinfo	grabinfo[ZR36120_MAX_FBUFFERS];	/* grabbing data*/
 	wait_queue_head_t grabq;	/* grabbers queue		*/
 
 	/* VBI details */
@@ -146,14 +146,14 @@ struct zoran 
 	uint		vidHeight;	/* calculated */
 };
 
-#define zrwrite(dat,adr)    writel((dat),(char *) (ztv->zoran_mem+(adr)))
-#define zrread(adr)         readl(ztv->zoran_mem+(adr))
+#define zrwrite(dat,adr)    writel((dat),(char *) (ztv->zr36120_mem+(adr)))
+#define zrread(adr)         readl(ztv->zr36120_mem+(adr))
 
 /* defined in zr36120_i2c */
-extern int zoran_i2c_load(struct zoran *ztv);
-extern void zoran_i2c_unload(struct zoran *ztv);
-extern int zoran_i2c_command(struct zoran *ztv, int cmd, void *data);
-extern int zoran_i2c_tuner_command(struct zoran *ztv, int cmd, void *data);
+extern int zr36120_i2c_load(struct zr36120 *ztv);
+extern void zr36120_i2c_unload(struct zr36120 *ztv);
+extern int zr36120_i2c_command(struct zr36120 *ztv, int cmd, void *data);
+extern int zr36120_i2c_tuner_command(struct zr36120 *ztv, int cmd, void *data);
 
 #if PDEBUG == 0
 #define zrand(dat,adr)      zrwrite((dat) & zrread(adr), adr)
@@ -165,7 +165,7 @@ do { \
 	ulong data = (dat) & zrread((adr)); \
 	zrwrite(data, (adr)); \
 	if (0 != (~(dat) & zrread((adr)))) \
-		printk(KERN_DEBUG "zoran: zrand at %d(%d) detected set bits(%x)\n", __LINE__, (adr), (dat)); \
+		printk(KERN_DEBUG "%s: zrand at %d(%d) detected set bits(%x)\n", zr36120_name, __LINE__, (adr), (dat)); \
 } while(0)
 
 #define zror(dat, adr) \
@@ -173,116 +173,116 @@ do { \
 	ulong data = (dat) | zrread((adr)); \
 	zrwrite(data, (adr)); \
 	if ((dat) != ((dat) & zrread(adr))) \
-		printk(KERN_DEBUG "zoran: zror at %d(%d) detected unset bits(%x)\n", __LINE__, (adr), (dat)); \
+		printk(KERN_DEBUG "%s: zror at %d(%d) detected unset bits(%x)\n", zr36120_name, __LINE__, (adr), (dat)); \
 } while(0)
 
 #define zraor(dat, mask, adr) \
 do { \
 	ulong data; \
 	if ((dat) & (mask)) \
-		printk(KERN_DEBUG "zoran: zraor at %d(%d) detected bits(%x:%x)\n", __LINE__, (adr), (dat), (mask)); \
+		printk(KERN_DEBUG "%s: zraor at %d(%d) detected bits(%x:%x)\n", zr36120_name, __LINE__, (adr), (dat), (mask)); \
 	data = ((dat)&~(mask)) | ((mask) & zrread((adr))); \
 	zrwrite(data,(adr)); \
 	if ( (dat) != (~(mask) & zrread((adr))) ) \
-		printk(KERN_DEBUG "zoran: zraor at %d(%d) could not set all bits(%x:%x)\n", __LINE__, (adr), (dat), (mask)); \
+		printk(KERN_DEBUG "%s: zraor at %d(%d) could not set all bits(%x:%x)\n", zr36120_name, __LINE__, (adr), (dat), (mask)); \
 } while(0)
 #endif
 
 #endif
 
 /* zoran PCI address space */
-#define ZORAN_VFEH		0x000	/* Video Front End Horizontal Conf. */
-#define	ZORAN_VFEH_HSPOL	(1<<30)
-#define	ZORAN_VFEH_HSTART	(0x3FF<<10)
-#define	ZORAN_VFEH_HEND		(0x3FF<<0)
-
-#define ZORAN_VFEV		0x004	/* Video Front End Vertical Conf. */
-#define	ZORAN_VFEV_VSPOL	(1<<30)
-#define	ZORAN_VFEV_VSTART	(0x3FF<<10)
-#define	ZORAN_VFEV_VEND		(0x3FF<<0)
-
-#define	ZORAN_VFEC		0x008	/* Video Front End Scaler and Pixel */
-#define ZORAN_VFEC_EXTFL	(1<<26)
-#define	ZORAN_VFEC_TOPFIELD	(1<<25)
-#define	ZORAN_VFEC_VCLKPOL	(1<<24)
-#define	ZORAN_VFEC_HFILTER	(7<<21)
-#define	ZORAN_VFEC_HFILTER_1	(0<<21)	/* no lumi,    3-tap chromo */
-#define	ZORAN_VFEC_HFILTER_2	(1<<21)	/* 3-tap lumi, 3-tap chromo */
-#define	ZORAN_VFEC_HFILTER_3	(2<<21)	/* 4-tap lumi, 4-tap chromo */
-#define	ZORAN_VFEC_HFILTER_4	(3<<21)	/* 5-tap lumi, 4-tap chromo */
-#define	ZORAN_VFEC_HFILTER_5	(4<<21)	/* 4-tap lumi, 4-tap chromo */
-#define	ZORAN_VFEC_DUPFLD	(1<<20)
-#define	ZORAN_VFEC_HORDCM	(63<<14)
-#define	ZORAN_VFEC_VERDCM	(63<<8)
-#define	ZORAN_VFEC_DISPMOD	(1<<6)
-#define	ZORAN_VFEC_RGB		(3<<3)
-#define	ZORAN_VFEC_RGB_YUV422	(0<<3)
-#define	ZORAN_VFEC_RGB_RGB888	(1<<3)
-#define	ZORAN_VFEC_RGB_RGB565	(2<<3)
-#define	ZORAN_VFEC_RGB_RGB555	(3<<3)
-#define	ZORAN_VFEC_ERRDIF	(1<<2)
-#define	ZORAN_VFEC_PACK24	(1<<1)
-#define	ZORAN_VFEC_LE		(1<<0)
-
-#define	ZORAN_VTOP		0x00C	/* Video Display "Top" */
-
-#define	ZORAN_VBOT		0x010	/* Video Display "Bottom" */
-
-#define	ZORAN_VSTR		0x014	/* Video Display Stride */
-#define	ZORAN_VSTR_DISPSTRIDE	(0xFFFF<<16)
-#define	ZORAN_VSTR_VIDOVF	(1<<8)
-#define	ZORAN_VSTR_SNAPSHOT	(1<<1)
-#define	ZORAN_VSTR_GRAB		(1<<0)
-
-#define	ZORAN_VDC		0x018	/* Video Display Conf. */
-#define	ZORAN_VDC_VIDEN		(1<<31)
-#define	ZORAN_VDC_MINPIX	(0x1F<<25)
-#define	ZORAN_VDC_TRICOM	(1<<24)
-#define	ZORAN_VDC_VIDWINHT	(0x3FF<<12)
-#define	ZORAN_VDC_VIDWINWID	(0x3FF<<0)
-
-#define	ZORAN_MTOP		0x01C	/* Masking Map "Top" */
-
-#define	ZORAN_MBOT		0x020	/* Masking Map "Bottom" */
-
-#define	ZORAN_OCR		0x024	/* Overlay Control */
-#define	ZORAN_OCR_OVLEN		(1<<15)
-#define	ZORAN_OCR_MASKSTRIDE	(0xFF<<0)
-
-#define	ZORAN_PCI		0x028	/* System, PCI and GPP Control */
-#define	ZORAN_PCI_SOFTRESET	(1<<24)
-#define	ZORAN_PCI_WAITSTATE	(3<<16)
-#define	ZORAN_PCI_GENPURDIR	(0xFF<<0)
-
-#define	ZORAN_GUEST		0x02C	/* GuestBus Control */
-
-#define	ZORAN_CSOURCE		0x030	/* Code Source Address */
-
-#define	ZORAN_CTRANS		0x034	/* Code Transfer Control */
-
-#define	ZORAN_CMEM		0x038	/* Code Memory Pointer */
-
-#define	ZORAN_ISR		0x03C	/* Interrupt Status Register */
-#define	ZORAN_ISR_CODE		(1<<28)
-#define	ZORAN_ISR_GIRQ0		(1<<29)
-#define	ZORAN_ISR_GIRQ1		(1<<30)
-
-#define	ZORAN_ICR		0x040	/* Interrupt Control Register */
-#define	ZORAN_ICR_EN		(1<<24)
-#define	ZORAN_ICR_CODE		(1<<28)
-#define	ZORAN_ICR_GIRQ0		(1<<29)
-#define	ZORAN_ICR_GIRQ1		(1<<30)
-
-#define	ZORAN_I2C		0x044	/* I2C-Bus */
-#define ZORAN_I2C_SCL		(1<<1)
-#define ZORAN_I2C_SDA		(1<<0)
-
-#define	ZORAN_POST		0x48	/* PostOffice */
-#define	ZORAN_POST_PEN		(1<<25)
-#define	ZORAN_POST_TIME		(1<<24)
-#define	ZORAN_POST_DIR		(1<<23)
-#define	ZORAN_POST_GUESTID	(3<<20)
-#define	ZORAN_POST_GUEST	(7<<16)
-#define	ZORAN_POST_DATA		(0xFF<<0)
+#define ZR36120_VFEH		0x000	/* Video Front End Horizontal Conf. */
+#define	ZR36120_VFEH_HSPOL	(1<<30)
+#define	ZR36120_VFEH_HSTART	(0x3FF<<10)
+#define	ZR36120_VFEH_HEND	(0x3FF<<0)
+
+#define ZR36120_VFEV		0x004	/* Video Front End Vertical Conf. */
+#define	ZR36120_VFEV_VSPOL	(1<<30)
+#define	ZR36120_VFEV_VSTART	(0x3FF<<10)
+#define	ZR36120_VFEV_VEND	(0x3FF<<0)
+
+#define	ZR36120_VFEC		0x008	/* Video Front End Scaler and Pixel */
+#define ZR36120_VFEC_EXTFL	(1<<26)
+#define	ZR36120_VFEC_TOPFIELD	(1<<25)
+#define	ZR36120_VFEC_VCLKPOL	(1<<24)
+#define	ZR36120_VFEC_HFILTER	(7<<21)
+#define	ZR36120_VFEC_HFILTER_1	(0<<21)	/* no lumi,    3-tap chromo */
+#define	ZR36120_VFEC_HFILTER_2	(1<<21)	/* 3-tap lumi, 3-tap chromo */
+#define	ZR36120_VFEC_HFILTER_3	(2<<21)	/* 4-tap lumi, 4-tap chromo */
+#define	ZR36120_VFEC_HFILTER_4	(3<<21)	/* 5-tap lumi, 4-tap chromo */
+#define	ZR36120_VFEC_HFILTER_5	(4<<21)	/* 4-tap lumi, 4-tap chromo */
+#define	ZR36120_VFEC_DUPFLD	(1<<20)
+#define	ZR36120_VFEC_HORDCM	(63<<14)
+#define	ZR36120_VFEC_VERDCM	(63<<8)
+#define	ZR36120_VFEC_DISPMOD	(1<<6)
+#define	ZR36120_VFEC_RGB	(3<<3)
+#define	ZR36120_VFEC_RGB_YUV422	(0<<3)
+#define	ZR36120_VFEC_RGB_RGB888	(1<<3)
+#define	ZR36120_VFEC_RGB_RGB565	(2<<3)
+#define	ZR36120_VFEC_RGB_RGB555	(3<<3)
+#define	ZR36120_VFEC_ERRDIF	(1<<2)
+#define	ZR36120_VFEC_PACK24	(1<<1)
+#define	ZR36120_VFEC_LE		(1<<0)
+
+#define	ZR36120_VTOP		0x00C	/* Video Display "Top" */
+
+#define	ZR36120_VBOT		0x010	/* Video Display "Bottom" */
+
+#define	ZR36120_VSTR		0x014	/* Video Display Stride */
+#define	ZR36120_VSTR_DISPSTRIDE	(0xFFFF<<16)
+#define	ZR36120_VSTR_VIDOVF	(1<<8)
+#define	ZR36120_VSTR_SNAPSHOT	(1<<1)
+#define	ZR36120_VSTR_GRAB	(1<<0)
+
+#define	ZR36120_VDC		0x018	/* Video Display Conf. */
+#define	ZR36120_VDC_VIDEN	(1<<31)
+#define	ZR36120_VDC_MINPIX	(0x1F<<25)
+#define	ZR36120_VDC_TRICOM	(1<<24)
+#define	ZR36120_VDC_VIDWINHT	(0x3FF<<12)
+#define	ZR36120_VDC_VIDWINWID	(0x3FF<<0)
+
+#define	ZR36120_MTOP		0x01C	/* Masking Map "Top" */
+
+#define	ZR36120_MBOT		0x020	/* Masking Map "Bottom" */
+
+#define	ZR36120_OCR		0x024	/* Overlay Control */
+#define	ZR36120_OCR_OVLEN	(1<<15)
+#define	ZR36120_OCR_MASKSTRIDE	(0xFF<<0)
+
+#define	ZR36120_PCI		0x028	/* System, PCI and GPP Control */
+#define	ZR36120_PCI_SOFTRESET	(1<<24)
+#define	ZR36120_PCI_WAITSTATE	(3<<16)
+#define	ZR36120_PCI_GENPURDIR	(0xFF<<0)
+
+#define	ZR36120_GUEST		0x02C	/* GuestBus Control */
+
+#define	ZR36120_CSOURCE		0x030	/* Code Source Address */
+
+#define	ZR36120_CTRANS		0x034	/* Code Transfer Control */
+
+#define	ZR36120_CMEM		0x038	/* Code Memory Pointer */
+
+#define	ZR36120_ISR		0x03C	/* Interrupt Status Register */
+#define	ZR36120_ISR_CODE	(1<<28)
+#define	ZR36120_ISR_GIRQ0	(1<<29)
+#define	ZR36120_ISR_GIRQ1	(1<<30)
+
+#define	ZR36120_ICR		0x040	/* Interrupt Control Register */
+#define	ZR36120_ICR_EN		(1<<24)
+#define	ZR36120_ICR_CODE	(1<<28)
+#define	ZR36120_ICR_GIRQ0	(1<<29)
+#define	ZR36120_ICR_GIRQ1	(1<<30)
+
+#define	ZR36120_I2C		0x044	/* I2C-Bus */
+#define ZR36120_I2C_SCL		(1<<1)
+#define ZR36120_I2C_SDA		(1<<0)
+
+#define	ZR36120_POST		0x48	/* PostOffice */
+#define	ZR36120_POST_PEN	(1<<25)
+#define	ZR36120_POST_TIME	(1<<24)
+#define	ZR36120_POST_DIR	(1<<23)
+#define	ZR36120_POST_GUESTID	(3<<20)
+#define	ZR36120_POST_GUEST	(7<<16)
+#define	ZR36120_POST_DATA	(0xFF<<0)
 
 #endif
diff -uprNX dontdiff 2.6-zoran-inc/drivers/media/video/zr36120_i2c.c 2.6-zoran/drivers/media/video/zr36120_i2c.c
--- 2.6-zoran-inc/drivers/media/video/zr36120_i2c.c	2004-07-14 13:47:23.000000000 -0300
+++ 2.6-zoran/drivers/media/video/zr36120_i2c.c	2004-07-14 13:48:01.000000000 -0300
@@ -37,45 +37,51 @@
 #define I2C_DELAY   10
 
 /* software I2C functions */
-static int zoran_i2c_getsda (void* data)
+static int zr36120_i2c_getsda (void* data)
 {
-	struct zoran* ztv = (struct zoran*)data;
-	return zrread(ZORAN_I2C) & (ztv->card->swapi2c ? ZORAN_I2C_SCL : ZORAN_I2C_SDA);
+	struct zr36120* ztv = (struct zr36120*)data;
+	return zrread(ZR36120_I2C) & (ztv->card->swapi2c ?
+				ZR36120_I2C_SCL : ZR36120_I2C_SDA);
 }
 
 static
-int zoran_i2c_getscl (void* data)
+int zr36120_i2c_getscl (void* data)
 {
-	struct zoran* ztv = (struct zoran*)data;
-	return zrread(ZORAN_I2C) & (ztv->card->swapi2c ? ZORAN_I2C_SDA : ZORAN_I2C_SCL);
+	struct zr36120* ztv = (struct zr36120*)data;
+	return zrread(ZR36120_I2C) & (ztv->card->swapi2c ?
+				ZR36120_I2C_SDA : ZR36120_I2C_SCL);
 }
 
 static
-void zoran_i2c_setsda (void* data, int state)
+void zr36120_i2c_setsda (void* data, int state)
 {
-	struct zoran* ztv = (struct zoran*)data;
+	struct zr36120* ztv = (struct zr36120*)data;
 	if (state)
-		ztv->i2cbr |= (ztv->card->swapi2c ? ZORAN_I2C_SCL : ZORAN_I2C_SDA);
+		ztv->i2cbr |= (ztv->card->swapi2c ?
+				ZR36120_I2C_SCL : ZR36120_I2C_SDA);
 	else
-		ztv->i2cbr &= ~(ztv->card->swapi2c ? ZORAN_I2C_SCL : ZORAN_I2C_SDA);
-	zrwrite(ztv->i2cbr, ZORAN_I2C);
+		ztv->i2cbr &= ~(ztv->card->swapi2c ?
+				ZR36120_I2C_SCL : ZR36120_I2C_SDA);
+	zrwrite(ztv->i2cbr, ZR36120_I2C);
 }
 
 static
-void zoran_i2c_setscl (void* data, int state)
+void zr36120_i2c_setscl (void* data, int state)
 {
-	struct zoran* ztv = (struct zoran*)data;
+	struct zr36120* ztv = (struct zr36120*)data;
 	if (state)
-		ztv->i2cbr |= (ztv->card->swapi2c ? ZORAN_I2C_SDA : ZORAN_I2C_SCL);
+		ztv->i2cbr |= (ztv->card->swapi2c ?
+				ZR36120_I2C_SDA : ZR36120_I2C_SCL);
 	else
-		ztv->i2cbr &= ~(ztv->card->swapi2c ? ZORAN_I2C_SDA : ZORAN_I2C_SCL);
-	zrwrite(ztv->i2cbr, ZORAN_I2C);
+		ztv->i2cbr &= ~(ztv->card->swapi2c ?
+				ZR36120_I2C_SDA : ZR36120_I2C_SCL);
+	zrwrite(ztv->i2cbr, ZR36120_I2C);
 }
 
 static
 int attach_inform(struct i2c_client *client)
 {
-	struct zoran *ztv = (struct zoran*)i2c_get_adapdata(client->adapter);
+	struct zr36120 *ztv = (struct zr36120*)i2c_get_adapdata(client->adapter);
 	struct video_decoder_capability dc;
 	int rv;
 
@@ -90,7 +96,7 @@ int attach_inform(struct i2c_client *cli
 		DEBUG(printk(CARD_INFO "decoder attached\n",CARD));
 
 		/* fetch the capabilites of the decoder */
-		rv = zoran_i2c_command(ztv, DECODER_GET_CAPABILITIES, &dc);
+		rv = zr36120_i2c_command(ztv, DECODER_GET_CAPABILITIES, &dc);
 		if (rv) {
 			DEBUG(printk(CARD_DEBUG "decoder is not V4L aware!\n",CARD));
 			break;
@@ -108,7 +114,7 @@ int attach_inform(struct i2c_client *cli
 		DEBUG(printk(CARD_INFO "tuner attached\n",CARD));
 		if (ztv->tuner_type >= 0)
 		{
-			if (zoran_i2c_command(ztv, TUNER_SET_TYPE, &ztv->tuner_type)<0)
+			if (zr36120_i2c_command(ztv, TUNER_SET_TYPE, &ztv->tuner_type)<0)
 			DEBUG(printk(CARD_INFO "attach_inform; tuner won't be set to type %d\n",CARD,ztv->tuner_type));
 		}
 		break;
@@ -123,7 +129,7 @@ int attach_inform(struct i2c_client *cli
 static
 int detach_inform(struct i2c_client *client)
 {
-	struct zoran *ztv = (struct zoran *)i2c_get_adapdata(client->adapter);
+	struct zr36120 *ztv = (struct zr36120 *)i2c_get_adapdata(client->adapter);
 
 	switch (client->driver->id) {
 	 case I2C_DRIVERID_SAA7110:
@@ -142,17 +148,17 @@ int detach_inform(struct i2c_client *cli
 	return 0;
 }
 
-static struct i2c_algo_bit_data zoran_i2c_bit_data_template = {
-	.setsda = zoran_i2c_setsda,
-	.setscl = zoran_i2c_setscl,
-	.getsda = zoran_i2c_getsda,
-	.getscl = zoran_i2c_getscl,
+static struct i2c_algo_bit_data zr36120_i2c_bit_data_template = {
+	.setsda = zr36120_i2c_setsda,
+	.setscl = zr36120_i2c_setscl,
+	.getsda = zr36120_i2c_getsda,
+	.getscl = zr36120_i2c_getscl,
 	.udelay = I2C_DELAY,
 	.mdelay = 0,
 	.timeout = 100,
 };
 
-static struct i2c_adapter zoran_i2c_adapter_template = {
+static struct i2c_adapter zr36120_i2c_adapter_template = {
 	.name = "ZR36120",
 	.id = I2C_HW_B_ZR36120,
 	.algo = NULL,
@@ -160,13 +166,13 @@ static struct i2c_adapter zoran_i2c_adap
 	.client_unregister = detach_inform,
 };
 
-int zoran_i2c_load (struct zoran *ztv)
+int zr36120_i2c_load (struct zr36120 *ztv)
 {
-	memcpy(&ztv->i2c_algo, &zoran_i2c_bit_data_template,
+	memcpy(&ztv->i2c_algo, &zr36120_i2c_bit_data_template,
 		sizeof(struct i2c_algo_bit_data));
 	ztv->i2c_algo.data = ztv;
 
-	memcpy(&ztv->i2c_adapter, &zoran_i2c_adapter_template,
+	memcpy(&ztv->i2c_adapter, &zr36120_i2c_adapter_template,
 		sizeof(struct i2c_adapter));
 	i2c_set_adapdata(&ztv->i2c_adapter, ztv);
 
@@ -175,12 +181,12 @@ int zoran_i2c_load (struct zoran *ztv)
 	return i2c_bit_add_bus(&ztv->i2c_adapter);
 }
 
-void zoran_i2c_unload (struct zoran *ztv)
+void zr36120_i2c_unload (struct zr36120 *ztv)
 {
 	i2c_bit_del_bus(&ztv->i2c_adapter);
 }
 
-int zoran_i2c_command (struct zoran *ztv, int cmd, void *data)
+int zr36120_i2c_command (struct zr36120 *ztv, int cmd, void *data)
 {
 	if (!ztv->decoder)
 		return -EIO;
@@ -188,7 +194,7 @@ int zoran_i2c_command (struct zoran *ztv
 	return ztv->decoder->driver->command(ztv->decoder, cmd, data);
 }
 
-int zoran_i2c_tuner_command (struct zoran *ztv, int cmd, void *data)
+int zr36120_i2c_tuner_command (struct zr36120 *ztv, int cmd, void *data)
 {
 	if (!ztv->tuner)
 		return -EIO;

