--- ../alsa-kernel/pci/bt87x.c	2007-12-20 11:47:36.000000000 +0100
+++ bt87x.c	2007-12-20 12:00:32.000000000 +0100
@@ -1,3 +1,4 @@
+#include "adriver.h"
 /*
  * bt87x.c - Brooktree Bt878/Bt879 driver for ALSA
  *
@@ -845,21 +846,33 @@
 {
 	int i;
 	const struct pci_device_id *supported;
+	u16 subsystem_vendor, subsystem_device;
 
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 13)
 	supported = pci_match_id(snd_bt87x_ids, pci);
+#else
+	supported = pci_match_device(snd_bt87x_ids, pci);
+#endif
 	if (supported && supported->driver_data > 0)
 		return supported->driver_data;
 
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 3, 0)
+	subsystem_vendor = pci->subsystem_vendor;
+	subsystem_device = pci->subsystem_device;
+#else
+	pci_read_config_word(pci, PCI_SUBSYSTEM_VENDOR_ID, &subsystem_vendor);
+	pci_read_config_word(pci, PCI_SUBSYSTEM_ID, &subsystem_device);
+#endif
 	for (i = 0; i < ARRAY_SIZE(blacklist); ++i)
-		if (blacklist[i].subvendor == pci->subsystem_vendor &&
-		    blacklist[i].subdevice == pci->subsystem_device) {
+		if (blacklist[i].subvendor == subsystem_vendor &&
+		    blacklist[i].subdevice == subsystem_device) {
 			snd_printdd(KERN_INFO "card %#04x-%#04x:%#04x has no audio\n",
-				    pci->device, pci->subsystem_vendor, pci->subsystem_device);
+				    pci->device, subsystem_vendor, subsystem_device);
 			return -EBUSY;
 		}
 
 	snd_printk(KERN_INFO "unknown card %#04x-%#04x:%#04x\n",
-		   pci->device, pci->subsystem_vendor, pci->subsystem_device);
+		   pci->device, subsystem_vendor, subsystem_device);
 	snd_printk(KERN_DEBUG "please mail id, board name, and, "
 		   "if it works, the correct digital_rate option to "
 		   "<alsa-devel@alsa-project.org>\n");
@@ -987,3 +1000,5 @@
 
 module_init(alsa_card_bt87x_init)
 module_exit(alsa_card_bt87x_exit)
+
+EXPORT_NO_SYMBOLS;
