ALSA bt87x compile failure in 2.6.13-rc3
Subsystems (2)
CC [M] sound/pci/bt87x.osound/pci/bt87x.c: In function `snd_bt87x_detect_card':sound/pci/bt87x.c:807: error: `driver' undeclared (first use in this function) sound/pci/bt87x.c:807: error: (Each undeclared identifier is reported only once sound/pci/bt87x.c:807: error: for each function it appears in.) sound/pci/bt87x.c: At top level:sound/pci/bt87x.c:910: error: `driver' used prior to declaration make[2]: *** [sound/pci/bt87x.o] Error 1
Substituting driver with pci->driver seems to cure it, it this the correct fix?
Signature · 1 line
Meelis Roos ([email protected])
MR> Substituting driver with pci->driver seems to cure it, it this the MR> correct fix?
I mean, the second argument to pci_match_device is already pci so it looks strange.
Anyway, here is the patch that I used to get it to compile - untested.
sound/pci/bt87x.c +1 -1
@@ -804,7 +804,7 @@ static int __devinit snd_bt87x_detect_caint i;const struct pci_device_id *supported; - supported =pci_match_device (driver, pci); + supported =pci_match_device (pci->driver, pci);if (supported)return supported->driver_data;
Signature · 1 line
Meelis Roos
At Wed, 6 Jul 2005 09:27:36 +0300 (EEST),
Quoted 10 lines · Meelis Roos
CC [M] sound/pci/bt87x.o
sound/pci/bt87x.c: In function `snd_bt87x_detect_card':sound/pci/bt87x.c:807: error: `driver' undeclared (first use in this function)sound/pci/bt87x.c:807: error: (Each undeclared identifier is reported only oncesound/pci/bt87x.c:807: error: for each function it appears in.)sound/pci/bt87x.c: At top level:sound/pci/bt87x.c:910: error: `driver' used prior to declaration make[2]: *** [sound/pci/bt87x.o] Error 1
Quoted 2 lines
Substituting driver with
pci->driverseems to cure it, it this the correct fix?
The below one-liner should fix.
Takashi
----
[ALSA] Fix the compilation of bt87x.c
Use pci_match_id() function instead of pci_match_device() to compile properly.
sound/pci/bt87x.c +1 -1
@@ -804,7 +804,7 @@ static int __devinit snd_bt87x_detect_caint i;const struct pci_device_id *supported; - supported =pci_match_device (driver, pci); + supported =pci_match_id (snd_bt87x_ids, pci);if (supported)return supported->driver_data;