--- ../alsa-kernel/usb/usbmixer.c	2008-06-05 16:16:42.000000000 +0200
+++ usbmixer.c	2008-06-06 10:19:29.000000000 +0200
@@ -1,3 +1,17 @@
+#include "config.h"
+#ifdef CONFIG_HAVE_DEPRECATED_CONFIG_H
+#include <linux/autoconf.h>
+#else
+#include <linux/config.h>
+#endif
+#include <linux/version.h>
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
+#define SND_NEED_USB_WRAPPER
+#define __NO_VERSION__
+#endif
+#include "adriver.h"
+
 /*
  *   (Tentative) USB Audio Driver for ALSA
  *
@@ -40,6 +54,14 @@
 
 #include "usbaudio.h"
 
+#ifndef USB_DT_CS_DEVICE
+#define USB_DT_CS_DEVICE		0x21
+#define USB_DT_CS_CONFIG		0x22
+#define USB_DT_CS_STRING		0x23
+#define USB_DT_CS_INTERFACE		0x24
+#define USB_DT_CS_ENDPOINT		0x25
+#endif
+
 /*
  */
 
@@ -1713,7 +1735,11 @@
 	}
 }
 
+#if !defined(OLD_USB) && !defined(CONFIG_SND_NEW_IRQ_HANDLER)
+static void snd_usb_mixer_status_complete(struct urb *urb, struct pt_regs *regs)
+#else
 static void snd_usb_mixer_status_complete(struct urb *urb)
+#endif
 {
 	struct usb_mixer_interface *mixer = urb->context;
 
@@ -1758,7 +1784,11 @@
 		return 0;
 
 	epnum = ep->bEndpointAddress & USB_ENDPOINT_NUMBER_MASK;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 11)
 	buffer_length = le16_to_cpu(ep->wMaxPacketSize);
+#else
+	buffer_length = ep->wMaxPacketSize;
+#endif
 	transfer_buffer = kmalloc(buffer_length, GFP_KERNEL);
 	if (!transfer_buffer)
 		return -ENOMEM;
@@ -1775,7 +1805,12 @@
 	return 0;
 }
 
+#if !defined(OLD_USB) && !defined(CONFIG_SND_NEW_IRQ_HANDLER)
+static void snd_usb_soundblaster_remote_complete(struct urb *urb,
+						 struct pt_regs *regs)
+#else
 static void snd_usb_soundblaster_remote_complete(struct urb *urb)
+#endif
 {
 	struct usb_mixer_interface *mixer = urb->context;
 	const struct rc_config *rc = mixer->rc_cfg;
