2002-11-23 04:05:43

by Loic Jaquemet

[permalink] [raw]
Subject: 2.5.49 - bttv module not compiling

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



2002-11-23 09:17:14

by Adrian Bunk

[permalink] [raw]
Subject: Re: 2.5.49 - bttv module not compiling

On Sat, Nov 23, 2002 at 04:12:50AM +0000, Loic Jaquemet wrote:

>...
> 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: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:


diff -urdN linux/drivers/media/video/bttv-cards.c linux/drivers/media/video/bttv-cards.c
--- linux/drivers/media/video/bttv-cards.c 2002-11-18 13:50:42.000000000 +0000
+++ linux/drivers/media/video/bttv-cards.c 2002-11-18 13:55:51.000000000 +0000
@@ -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

--

"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

2002-11-23 10:15:37

by Martin Loschwitz

[permalink] [raw]
Subject: [PATCH] 2.5.49: make bttv compiling again

Hi all,

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

### BEGIN PATCH ###

diff -ruN linux-2.5.49-old/drivers/media/video/audiochip.h linux-2.5.49/drivers/media/video/audiochip.h
--- linux-2.5.49-old/drivers/media/video/audiochip.h 2002-11-22 22:40:23.000000000 +0100
+++ linux-2.5.49/drivers/media/video/audiochip.h 2002-11-23 10:24:19.000000000 +0100
@@ -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 */
diff -ruN linux-2.5.49-old/drivers/media/video/bttv-cards.c linux-2.5.49/drivers/media/video/bttv-cards.c
--- linux-2.5.49-old/drivers/media/video/bttv-cards.c 2002-11-22 22:40:42.000000000 +0100
+++ linux-2.5.49/drivers/media/video/bttv-cards.c 2002-11-23 10:24:38.000000000 +0100
@@ -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 ###

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


Attachments:
(No filename) (1.38 kB)
(No filename) (189.00 B)
Download all attachments