Skip to contentSkip to conversation

2.5.49 - bttv module not compiling

PATCH New Loic Jaquemet 3 participants 3 messages Nov 23, 2002 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

2 errors in drivers/media/video/bttv-cards.c

One #define is missing for AUDC_CONFIG_PINNACLE, used line 1742 ?

struct pci_dev has no name member ? line 2993.

        struct pci_dev *dev = NULL;
	[...]
                printk(KERN_INFO "bttv: Host bridge is %s\n",dev->name);

gcc -Wp,-MD,drivers/media/video/.bttv-cards.o.d -D__KERNEL__ -Iinclude -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2 -march=k6 -Iarch/i386/mach-generic -nostdinc -iwithprefix include -DMODULE -DKBUILD_BASENAME=bttv_cards -DKBUILD_MODNAME=bttv -c -o drivers/media/video/bttv-cards.o drivers/media/video/bttv-cards.c
drivers/media/video/bttv-cards.c: Dans la fonction « miro_pinnacle_gpio »:
drivers/media/video/bttv-cards.c:1742: « AUDC_CONFIG_PINNACLE » non déclaré (première utilisation dans cette fonction) drivers/media/video/bttv-cards.c:1742: (Chaque identificateur non déclaré est rapporté une seule fois drivers/media/video/bttv-cards.c:1742: pour chaque fonction dans laquelle il apparaît.) drivers/media/video/bttv-cards.c: Dans la fonction « bttv_check_chipset »:
drivers/media/video/bttv-cards.c:2993: structure n'a pas de membre nommé « name »
make[3]: *** [drivers/media/video/bttv-cards.o] Erreur 1
make[2]: *** [drivers/media/video] Erreur 2
make[1]: *** [drivers/media] Erreur 2
make: *** [drivers] Erreur 2

linux-2.5.49$ grep -rn AUDC_CONFIG_PINNACLE *
drivers/media/video/bttv-cards.c:1742: bttv_call_i2c_clients(btv,AUDC_CONFIG_PINNACLE,&id);
linux-2.5.49$

+----------------------------------------------+
|Jaquemet Loic                                 |
|Eleve ingenieur en informatique FIIFO, ORSAY  |
+----------------------------------------------+

http://sourceforge.net/projects/ffss/
#wirelessfr @ irc.freenode.net

#1 lore raw
Quoted 8 lines · Loic Jaquemet

...
struct pci_dev has no name member ? line 2993.

        struct pci_dev *dev = NULL;
	[...]
                printk(KERN_INFO "bttv: Host bridge is %s\n",dev->name);
Quoted 8 lines

gcc -Wp,-MD,drivers/media/video/.bttv-cards.o.d -D__KERNEL__ -Iinclude -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2 -march=k6 -Iarch/i386/mach-generic -nostdinc -iwithprefix include -DMODULE -DKBUILD_BASENAME=bttv_cards -DKBUILD_MODNAME=bttv -c -o drivers/media/video/bttv-cards.o drivers/media/video/bttv-cards.c
...
drivers/media/video/bttv-cards.c:2993: structure n'a pas de membre nommé « name » make[3]: *** [drivers/media/video/bttv-cards.o] Erreur 1
make[2]: *** [drivers/media/video] Erreur 2
make[1]: *** [drivers/media] Erreur 2
make: *** [drivers] Erreur 2
...

Petr Vandrovec <[email protected]> sent the following patch to fix this compile error:

drivers/media/video/bttv-cards.c +1 -1
diff -urdN linux/drivers/media/video/bttv-cards.c linux/drivers/media/video/bttv-cards.c
@@ -2990,7 +2990,7 @@
 
 	/* print which chipset we have */
 	while ((dev = pci_find_class(PCI_CLASS_BRIDGE_HOST << 8,dev)))
-		printk(KERN_INFO "bttv: Host bridge is %s\n",dev->name);
+		printk(KERN_INFO "bttv: Host bridge is %s\n",dev->dev.name);
 
 	/* print warnings about any quirks found */
 	if (triton1)

cu
Adrian

Signature · 4 lines
       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed
#2 lore raw

PATCH 1/1 2.5.49: make bttv compiling again

In reply to Loic Jaquemet

Hi all,

in order to make bttv compiling in 2.5.49, the following patch was necessary for me.

### BEGIN PATCH ###

drivers/media/video/audiochip.h +3 -0
diff -ruN linux-2.5.49-old/drivers/media/video/audiochip.h linux-2.5.49/drivers/media/video/audiochip.h
@@ -67,4 +67,7 @@
 #define AUDC_SWITCH_MUTE      _IO('m',16)      /* turn on mute */
 #endif
 
+/* misc stuff to pass around config info to i2c chips */
+#define AUDC_CONFIG_PINNACLE  _IOW('m',32,int)
+
 #endif /* AUDIOCHIP_H */
drivers/media/video/bttv-cards.c +1 -1
diff -ruN linux-2.5.49-old/drivers/media/video/bttv-cards.c linux-2.5.49/drivers/media/video/bttv-cards.c
@@ -2990,7 +2990,7 @@
 
 	/* print which chipset we have */
 	while ((dev = pci_find_class(PCI_CLASS_BRIDGE_HOST << 8,dev)))
-		printk(KERN_INFO "bttv: Host bridge is %s\n",dev->name);
+		printk(KERN_INFO "bttv: Host bridge is %s\n",dev->dev.name);
 
 	/* print warnings about any quirks found */
 	if (triton1)

### END PATCH ###

Signature · 4 lines
  .''`.   Name: Martin Loschwitz
 : :'  :  E-Mail: [email protected]
 `. `'`   www: http://www.madkiss.org/ 
   `-     Use Debian GNU/Linux - http://www.debian.org