--- ../alsa-kernel/pci/maestro3.c	2005-05-24 13:58:28.000000000 +0200
+++ maestro3.c	2005-05-24 14:23:49.000000000 +0200
@@ -2673,6 +2673,7 @@
 	int i, err;
 	struct m3_quirk *quirk;
 	struct m3_hv_quirk *hv_quirk;
+	u16 subsystem_vendor, subsystem_device;
 	static snd_device_ops_t ops = {
 		.dev_free =	snd_m3_dev_free,
 	};
@@ -2696,6 +2697,14 @@
 		return -ENOMEM;
 	}
 
+#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
+
 	spin_lock_init(&chip->reg_lock);
 	switch (pci->device) {
 	case PCI_DEVICE_ID_ESS_ALLEGRO:
@@ -2711,8 +2720,8 @@
 	chip->irq = -1;
 
 	for (quirk = m3_quirk_list; quirk->vendor; quirk++) {
-		if (pci->subsystem_vendor == quirk->vendor &&
-		    pci->subsystem_device == quirk->device) {
+		if (subsystem_vendor == quirk->vendor &&
+		    subsystem_device == quirk->device) {
 			printk(KERN_INFO "maestro3: enabled hack for '%s'\n", quirk->name);
 			chip->quirk = quirk;
 			break;
@@ -2722,8 +2731,8 @@
 	for (hv_quirk = m3_hv_quirk_list; hv_quirk->vendor; hv_quirk++) {
 		if (pci->vendor == hv_quirk->vendor &&
 		    pci->device == hv_quirk->device &&
-		    pci->subsystem_vendor == hv_quirk->subsystem_vendor &&
-		    pci->subsystem_device == hv_quirk->subsystem_device) {
+		    subsystem_vendor == hv_quirk->subsystem_vendor &&
+		    subsystem_device == hv_quirk->subsystem_device) {
 			chip->hv_quirk = hv_quirk;
 			break;
 		}
@@ -2908,3 +2917,5 @@
 
 module_init(alsa_card_m3_init)
 module_exit(alsa_card_m3_exit)
+
+EXPORT_NO_SYMBOLS;
