--- ../alsa-kernel/usb/card.c	2010-03-10 09:22:24.488022926 +0100
+++ card.c	2010-03-10 09:58:02.287522401 +0100
@@ -1,3 +1,4 @@
+#include "card.inc"
 /*
  *   (Tentative) USB Audio Driver for ALSA
  *
@@ -78,7 +79,12 @@
 static int vid[SNDRV_CARDS] = { [0 ... (SNDRV_CARDS-1)] = -1 };
 static int pid[SNDRV_CARDS] = { [0 ... (SNDRV_CARDS-1)] = -1 };
 static int nrpacks = 8;		/* max. number of packets per urb */
-static int async_unlink = 1;
+static int async_unlink =
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0)
+1;
+#else
+0; /* disabled as default for buggy async-unlink handling */
+#endif
 static int device_setup[SNDRV_CARDS]; /* device parameter for this card */
 static int ignore_ctl_error;
 
@@ -237,7 +243,11 @@
 	case UAC_VERSION_2: {
 		struct uac_clock_source_descriptor *cs;
 		struct usb_interface_assoc_descriptor *assoc =
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 23)
 			usb_ifnum_to_if(dev, ctrlif)->intf_assoc;
+#else
+			NULL;
+#endif
 
 		if (!assoc) {
 			snd_printk(KERN_ERR "Audio class v2 interfaces need an interface association\n");
@@ -340,8 +350,13 @@
 	chip->nrpacks = nrpacks;
 	chip->async_unlink = async_unlink;
 
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 11)
 	chip->usb_id = USB_ID(le16_to_cpu(dev->descriptor.idVendor),
 			      le16_to_cpu(dev->descriptor.idProduct));
+#else
+	chip->usb_id = USB_ID(dev->descriptor.idVendor,
+			      dev->descriptor.idProduct);
+#endif
 	INIT_LIST_HEAD(&chip->pcm_list);
 	INIT_LIST_HEAD(&chip->midi_list);
 	INIT_LIST_HEAD(&chip->mixer_list);
@@ -427,8 +442,12 @@
 
 	alts = &intf->altsetting[0];
 	ifnum = get_iface_desc(alts)->bInterfaceNumber;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 11)
 	id = USB_ID(le16_to_cpu(dev->descriptor.idVendor),
 		    le16_to_cpu(dev->descriptor.idProduct));
+#else
+	id = USB_ID(dev->descriptor.idVendor, dev->descriptor.idProduct);
+#endif
 	if (quirk && quirk->ifnum >= 0 && ifnum != quirk->ifnum)
 		goto __err_val;
 
@@ -546,6 +565,7 @@
 	}
 }
 
+#ifndef OLD_USB
 /*
  * new 2.5 USB kernel API
  */
@@ -606,6 +626,7 @@
 	return 0;
 }
 #endif		/* CONFIG_PM */
+#endif	/* OLD_USB */
 
 static struct usb_device_id usb_audio_ids [] = {
 #include "quirks-table.h"
@@ -622,11 +643,19 @@
  */
 
 static struct usb_driver usb_audio_driver = {
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 5, 70) && LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)	/* FIXME: find right number */
+	.owner =	THIS_MODULE,
+#endif
 	.name =		"snd-usb-audio",
 	.probe =	usb_audio_probe,
 	.disconnect =	usb_audio_disconnect,
+#ifndef OLD_USB
 	.suspend =	usb_audio_suspend,
 	.resume =	usb_audio_resume,
+#endif
+#ifdef OLD_USB
+	.driver_list =	LIST_HEAD_INIT(usb_audio_driver.driver_list), 
+#endif
 	.id_table =	usb_audio_ids,
 };
 
@@ -646,3 +675,5 @@
 
 module_init(snd_usb_audio_init);
 module_exit(snd_usb_audio_cleanup);
+
+#include "card.inc1"
