diff -ruN dahdi-2.2.1+dfsg-1ubuntu2/drivers/dahdi/voicebus/GpakCust.h dahdi-2.2.1+dfsg-1ubuntu2.new//drivers/dahdi/voicebus/GpakCust.h --- dahdi-2.2.1+dfsg-1ubuntu2/drivers/dahdi/voicebus/GpakCust.h 2009-11-12 20:02:24.000000000 +0000 +++ dahdi-2.2.1+dfsg-1ubuntu2.new//drivers/dahdi/voicebus/GpakCust.h 2010-09-15 20:16:26.335693239 +0100 @@ -39,10 +39,15 @@ #include #include #include +#include #include "gpakenum.h" #include "adt_lec.h" +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 25) +#include +#endif + #define DEBUG_ECHOCAN (1 << 1) /* Host and DSP system dependent related definitions. */ diff -ruN dahdi-2.2.1+dfsg-1ubuntu2/drivers/dahdi/wcb4xxp/base.c dahdi-2.2.1+dfsg-1ubuntu2.new//drivers/dahdi/wcb4xxp/base.c --- dahdi-2.2.1+dfsg-1ubuntu2/drivers/dahdi/wcb4xxp/base.c 2009-11-09 19:32:45.000000000 +0000 +++ dahdi-2.2.1+dfsg-1ubuntu2.new//drivers/dahdi/wcb4xxp/base.c 2010-09-15 20:16:26.363692329 +0100 @@ -20,7 +20,6 @@ * this program for more details. */ -#include #include #include /* printk() */ diff -ruN dahdi-2.2.1+dfsg-1ubuntu2/drivers/dahdi/wct4xxp/vpm450m.c dahdi-2.2.1+dfsg-1ubuntu2.new//drivers/dahdi/wct4xxp/vpm450m.c --- dahdi-2.2.1+dfsg-1ubuntu2/drivers/dahdi/wct4xxp/vpm450m.c 2008-08-06 22:07:48.000000000 +0100 +++ dahdi-2.2.1+dfsg-1ubuntu2.new//drivers/dahdi/wct4xxp/vpm450m.c 2010-09-15 20:16:26.319693760 +0100 @@ -30,8 +30,6 @@ #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18) #include -#else -#include #endif /* API for Octasic access */ diff -ruN dahdi-2.2.1+dfsg-1ubuntu2/drivers/dahdi/xpp/xpp_usb.c dahdi-2.2.1+dfsg-1ubuntu2.new//drivers/dahdi/xpp/xpp_usb.c --- dahdi-2.2.1+dfsg-1ubuntu2/drivers/dahdi/xpp/xpp_usb.c 2009-05-19 17:09:06.000000000 +0100 +++ dahdi-2.2.1+dfsg-1ubuntu2.new//drivers/dahdi/xpp/xpp_usb.c 2010-09-15 20:16:26.371692069 +0100 @@ -78,6 +78,12 @@ #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0) # warning "This module is tested only with 2.6 kernels" #endif +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 34) +# define usb_alloc_coherent(dev, size, mem_flags, dma) \ + usb_buffer_alloc(dev, size, mem_flags, dma) +# define usb_free_coherent(dev, size, addr, dma) \ + usb_buffer_free(dev, size, addr, dma) +#endif #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,12) # undef USB_FIELDS_MISSING #else @@ -308,7 +314,7 @@ return NULL; } usb_init_urb(&uframe->urb); - p = usb_buffer_alloc(xusb->udev, size, gfp_flags, &uframe->urb.transfer_dma); + p = usb_alloc_coherent(xusb->udev, size, gfp_flags, &uframe->urb.transfer_dma); if(!p) { if((rate_limit++ % 1003) == 0) XUSB_ERR(xusb, "buffer allocation failed (%d)\n", rate_limit); @@ -330,7 +336,7 @@ BUG_ON(xbus->transport.priv != uframe->xusb); //XUSB_INFO(uframe->xusb, "frame_free\n"); - usb_buffer_free(urb->dev, uframe->transfer_buffer_length, + usb_free_coherent(urb->dev, uframe->transfer_buffer_length, urb->transfer_buffer, urb->transfer_dma); memset(uframe, 0, sizeof(*uframe)); diff -ruN dahdi-2.2.1+dfsg-1ubuntu2/include/dahdi/dahdi_config.h dahdi-2.2.1+dfsg-1ubuntu2.new//include/dahdi/dahdi_config.h --- dahdi-2.2.1+dfsg-1ubuntu2/include/dahdi/dahdi_config.h 2009-07-21 19:11:53.000000000 +0100 +++ dahdi-2.2.1+dfsg-1ubuntu2.new//include/dahdi/dahdi_config.h 2010-09-15 20:16:26.375691939 +0100 @@ -23,8 +23,6 @@ #include #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18) #include -#else -#include #endif #endif