File: bt87x.patch

package info (click to toggle)
alsa-driver 1.0.8-7sarge1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 15,840 kB
  • ctags: 43,253
  • sloc: ansic: 257,429; sh: 18,021; makefile: 1,741; perl: 1,316; python: 1,280; xml: 448; awk: 66
file content (42 lines) | stat: -rw-r--r-- 1,514 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
--- ../../alsa-kernel/pci/bt87x.c	Thu Oct 21 22:07:07 2004
+++ bt87x.c	Thu Oct 21 22:21:26 2004
@@ -775,21 +775,29 @@
 {
 	int i;
 	const struct pci_device_id *supported;
+	u16 subsystem_vendor, subsystem_device;
 
 	supported = pci_match_device(snd_bt87x_ids, pci);
 	if (supported)
 		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 has no audio\n",
-				    pci->subsystem_vendor, pci->subsystem_device);
+				    subsystem_vendor, subsystem_device);
 			return -EBUSY;
 		}
 
 	snd_printk(KERN_INFO "unknown card %#04x:%#04x, using default rate 32000\n",
-		   pci->subsystem_vendor, pci->subsystem_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@lists.sf.net>\n");
@@ -900,3 +908,5 @@
 
 module_init(alsa_card_bt87x_init)
 module_exit(alsa_card_bt87x_exit)
+
+EXPORT_NO_SYMBOLS;