Changeset 319 for GPL/branches/uniaud-2.0/alsa-kernel/pci/bt87x.c
- Timestamp:
- Mar 25, 2008, 12:48:35 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GPL/branches/uniaud-2.0/alsa-kernel/pci/bt87x.c
r305 r319 22 22 */ 23 23 24 #ifdef TARGET_OS2 25 #include <asm/bitops.h> 26 #endif 24 27 #include <linux/init.h> 25 28 #include <linux/interrupt.h> … … 41 44 "{Brooktree,Bt879}}"); 42 45 46 #ifndef TARGET_OS2 43 47 static int index[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = -2}; /* Exclude the first card */ 44 48 static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; /* ID for this card */ 49 #else 50 static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* Index 0-MAX */ 51 static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; /* ID for this card */ 52 #endif 45 53 static int enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP; /* Enable this card */ 46 54 static int digital_rate[SNDRV_CARDS]; /* digital input rate */ … … 818 826 /* Pinnacle Studio PCTV rave */ 819 827 BT_DEVICE(PCI_DEVICE_ID_BROOKTREE_878, 0xbd11, 0x1200, GENERIC), 820 { 828 {0} 821 829 }; 822 830 MODULE_DEVICE_TABLE(pci, snd_bt87x_ids); … … 847 855 int i; 848 856 const struct pci_device_id *supported; 849 857 #ifdef TARGET_OS2 858 u16 subsystem_vendor, subsystem_device; 859 #endif 860 861 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 13) 850 862 supported = pci_match_id(snd_bt87x_ids, pci); 863 #else 864 supported = pci_match_device(snd_bt87x_ids, pci); 865 #endif 851 866 if (supported && supported->driver_data > 0) 852 867 return supported->driver_data; 853 868 869 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 3, 0) 870 subsystem_vendor = pci->subsystem_vendor; 871 subsystem_device = pci->subsystem_device; 872 #else 873 pci_read_config_word(pci, PCI_SUBSYSTEM_VENDOR_ID, &subsystem_vendor); 874 pci_read_config_word(pci, PCI_SUBSYSTEM_ID, &subsystem_device); 875 #endif 854 876 for (i = 0; i < ARRAY_SIZE(blacklist); ++i) 877 #ifndef TARGET_OS2 855 878 if (blacklist[i].subvendor == pci->subsystem_vendor && 856 879 blacklist[i].subdevice == pci->subsystem_device) { 880 #else 881 if (blacklist[i].subvendor == subsystem_vendor && 882 blacklist[i].subdevice == subsystem_device) { 883 #endif 857 884 snd_printdd(KERN_INFO "card %#04x-%#04x:%#04x has no audio\n", 885 #ifndef TARGET_OS2 858 886 pci->device, pci->subsystem_vendor, pci->subsystem_device); 887 #else 888 pci->device, subsystem_vendor, subsystem_device); 889 #endif 859 890 return -EBUSY; 860 891 } 861 892 862 893 snd_printk(KERN_INFO "unknown card %#04x-%#04x:%#04x\n", 894 #ifndef TARGET_OS2 863 895 pci->device, pci->subsystem_vendor, pci->subsystem_device); 896 #else 897 pci->device, subsystem_vendor, subsystem_device); 898 #endif 864 899 snd_printk(KERN_DEBUG "please mail id, board name, and, " 865 900 "if it works, the correct digital_rate option to " … … 965 1000 BT_DEVICE(PCI_DEVICE_ID_BROOKTREE_878, PCI_ANY_ID, PCI_ANY_ID, UNKNOWN), 966 1001 BT_DEVICE(PCI_DEVICE_ID_BROOKTREE_879, PCI_ANY_ID, PCI_ANY_ID, UNKNOWN), 967 { 1002 {0} 968 1003 }; 969 1004
Note:
See TracChangeset
for help on using the changeset viewer.