Hello community,

here is the log from the commit of package hdjmod.2807 for openSUSE:13.1:Update 
checked in at 2014-05-19 11:26:12
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:13.1:Update/hdjmod.2807 (Old)
 and      /work/SRC/openSUSE:13.1:Update/.hdjmod.2807.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "hdjmod.2807"

Changes:
--------
New Changes file:

--- /dev/null   2014-05-19 01:51:27.372033255 +0200
+++ /work/SRC/openSUSE:13.1:Update/.hdjmod.2807.new/hdjmod.changes      
2014-05-19 11:26:13.000000000 +0200
@@ -0,0 +1,63 @@
+-------------------------------------------------------------------
+Sun Dec 23 16:47:42 UTC 2012 - [email protected]
+
+- Fixed build on kernel 3.7 
+
+-------------------------------------------------------------------
+Tue Oct 16 19:57:00 UTC 2012 - [email protected]
+
+- Fixed build on kernel 3.6
+
+-------------------------------------------------------------------
+Sat Apr  7 11:23:39 UTC 2012 - [email protected]
+
+- Fixed build on SLE 11 SP 2
+
+-------------------------------------------------------------------
+Tue Mar 13 21:33:50 UTC 2012 - [email protected]
+
+- Fixed USB hotplugging
+  Previously the module also loaded for devices of other vendors.
+
+-------------------------------------------------------------------
+Wed Aug  3 09:01:04 UTC 2011 - [email protected]
+
+- license update: GPL-2.0+
+  Specify the license more accurately using the appropriate syntax
+
+-------------------------------------------------------------------
+Mon May 30 20:06:14 UTC 2011 - [email protected]
+
+- Fixed build on kernels newer than openSUSE 11.4
+
+-------------------------------------------------------------------
+Sat Apr 30 19:14:52 UTC 2011 - [email protected]
+
+- Fixed build on SLE 11 SP 1
+
+-------------------------------------------------------------------
+Sat Apr 30 17:51:05 UTC 2011 - [email protected]
+
+- Cleaned up spec file
+- Fixed missing dependency to the kernel
+
+-------------------------------------------------------------------
+Thu Dec  2 12:50:09 UTC 2010 - [email protected]
+
+- Patched to fix build with kernel 2.6.37
+
+-------------------------------------------------------------------
+Sun Sep 26 17:46:22 UTC 2010 - [email protected]
+
+- Patched to fix build with kernels newer than openSUSE 11.3
+
+-------------------------------------------------------------------
+Sun Jul 25 20:14:03 UTC 2010 - [email protected]
+
+- Build for older openSUSE versions
+
+-------------------------------------------------------------------
+Sun Jul 25 17:17:32 UTC 2010 - [email protected]
+
+- Initial version
+

New:
----
  hdjmod-1.28.tar.bz2
  hdjmod-kfree.patch
  hdjmod.changes
  hdjmod.spec
  hdjmod_fix_hotplug.patch
  hdjmod_kernel_2.6.30.patch
  hdjmod_kernel_2.6.36.patch.bz2
  hdjmod_kernel_2.6.37.patch
  hdjmod_kernel_2.6.39.patch
  hdjmod_kernel_3.6.patch
  hdjmod_kernel_3.7.patch
  preamble

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ hdjmod.spec ++++++
#
# spec file for package hdjmod
#
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright 2008 Matthias Bach <[email protected]>
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


Name:           hdjmod
Version:        1.28
Release:        0
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} < 1120
BuildRequires:  %kernel_module_package_buildreq
BuildRequires:  module-init-tools
%else
BuildRequires:  %kernel_module_package_buildreqs
%endif
Summary:        Support for Hercules DJ Devices
License:        GPL-2.0+
Group:          System/Kernel
Url:            
http://ts.hercules.com/ger/index.php?pg=view_files&gid=17&fid=62&pid=177&cid=1
Source0:        hdjmod-%{version}.tar.bz2
Source1:        preamble
# PATCH-FIX-UPSTREAM hdjmod_kernel_2.6.30.patch [email protected] -- Fix build on 
kernel 2.6.30 and newer
Patch0:         hdjmod_kernel_2.6.30.patch
# PATCH-FIX-UPSTREAM hdjmod_kernel_2.6.36.patch [email protected] -- Fix includes 
for kfree
Patch1:         hdjmod-kfree.patch
# PATCH-FIX-UPSTREAM hdjmod_kernel_2.6.36.patch [email protected] -- Fix build on 
kernel 2.6.36 and newer
Patch2:         hdjmod_kernel_2.6.36.patch.bz2
# PATCH-FIX-UPSTREAM hdjmod_kernel_2.6.37.patch [email protected] -- Fix build on 
kernel 2.6.37 and newer
Patch3:         hdjmod_kernel_2.6.37.patch
# PATCH-FIX-UPSTREAM hdjmod_kernel_2.6.39.patch [email protected] -- Fix build on 
kernel 2.6.39 and newer
Patch4:         hdjmod_kernel_2.6.39.patch
# PATCH-FIX-UPSTREAM hdjmod_fix_hotplug.patch [bnc#746358] [email protected] -- 
Don't load on hotplug of devices from other vendors
Patch5:         hdjmod_fix_hotplug.patch
# PATCH-FIX-UPSTREAM hdjmod_kernel_3.6.patch [bnc#783848] [email protected] -- 
Fix build on kernel 3.6 and newer
Patch6:         hdjmod_kernel_3.6.patch
# PATCH-FIX-UPSTREAM hdjmod_kernel_3.7.patch [email protected] -- Fix build on 
kernel 3.7 and newer
Patch7:         hdjmod_kernel_3.7.patch

# The package triggers RPM-Lint warning because it misses requires to the 
proper kernel packages
# These requires should be added by the kernel_module_package macro, so, 
therefore the are not
# fixed in this package. See also 
https://bugzilla.novell.com/show_bug.cgi?id=479141.

%suse_kernel_module_package -p%_sourcedir/preamble

%description
This is the Hercules DJ Series Kernel Module, which supports Hercules DJ 
Devices.

%prep
echo %flavors_to_build
%setup -q
%if 0%{?suse_version} >= 1120 || 0%{?sles_version} > 10
%patch0 -p1
%endif
%if 0%{?suse_version} >= 1140 || 0%{?sles_version} > 10
%patch2 -p1
%patch3 -F3 -p1
%patch4 -p1
%endif
%patch1 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
set -- *
mkdir source
mv "$@" source/
mkdir obj

%build
for flavor in %flavors_to_build; do
        rm -rf obj/$flavor
        cp -r source obj/$flavor
        make -C %{kernel_source $flavor} modules M=$PWD/obj/$flavor
done

%install
export INSTALL_MOD_PATH=%{buildroot}
export INSTALL_MOD_DIR=updates
for flavor in %flavors_to_build; do
        make -C %{kernel_source $flavor} modules_install M=$PWD/obj/$flavor
done

%changelog
++++++ hdjmod-kfree.patch ++++++
diff -Naru hdjmod-1.28o//configuration_manager.c 
hdjmod-1.28/configuration_manager.c
--- hdjmod-1.28o//configuration_manager.c       2010-07-25 18:57:11.000000000 
+0200
+++ hdjmod-1.28/configuration_manager.c 2010-07-25 19:00:15.000000000 +0200
@@ -23,6 +23,7 @@
 
 #include <linux/kernel.h>
 #include <linux/errno.h>
+#include <linux/slab.h>
 #include <linux/usb.h>
 #include <linux/version.h>     /* For LINUX_VERSION_CODE */
 #include <asm/atomic.h>
diff -Naru hdjmod-1.28o//midi.c hdjmod-1.28/midi.c
--- hdjmod-1.28o//midi.c        2010-07-25 18:57:11.000000000 +0200
+++ hdjmod-1.28/midi.c  2010-07-25 19:02:13.000000000 +0200
@@ -25,6 +25,7 @@
 #include <linux/kernel.h>
 #include <linux/version.h>     /* For LINUX_VERSION_CODE */
 #include <linux/errno.h>
+#include <linux/slab.h>
 #include <linux/types.h>
 #include <linux/bitops.h>
 #include <linux/interrupt.h>
++++++ hdjmod_fix_hotplug.patch ++++++
++++ 2822 lines (skipped)

++++++ hdjmod_kernel_2.6.30.patch ++++++
diff -Naru hdjmod-1.28o/device.c hdjmod-1.28/device.c
--- hdjmod-1.28o/device.c       2009-01-27 15:25:50.000000000 +0100
+++ hdjmod-1.28/device.c        2010-02-06 16:20:36.901740173 +0100
@@ -1660,11 +1660,19 @@
                /* let the kernel option override custom id */
                strncpy(card_id,id[idx],sizeof(card_id)-1);
        }
+#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,30) )
+       err = snd_card_create(index[idx], card_id/*id[idx]*/, THIS_MODULE, 0, 
&card );
+       if (err) {
+               snd_printk(KERN_WARNING "snd_hdj_chip_create(): cannot create 
card instance %d\n", idx);
+               return err;
+       }
+#else
        card = snd_card_new(index[idx], card_id/*id[idx]*/, THIS_MODULE, 0);
        if (card == NULL) {
                snd_printk(KERN_WARNING "snd_hdj_chip_create(): cannot create 
card instance %d\n", idx);
                return -ENOMEM;
        }
+#endif
        
        /* save the index, so people who have the card can reference the chip */
        card->private_data = (void*)(unsigned long)idx;
++++++ hdjmod_kernel_2.6.36.patch.bz2 ++++++
diff -Naru hdjmod-1.28.old/bulk.c hdjmod-1.28/bulk.c
--- hdjmod-1.28.old/bulk.c      2009-01-27 15:25:50.000000000 +0100
+++ hdjmod-1.28/bulk.c  2010-09-26 19:27:53.000000000 +0200
@@ -462,7 +462,7 @@
 
        chip->ctrl_urb->setup_dma = chip->ctl_req_dma;
        /* NOTE: transfer_dma setup above in call to usb_buffer_alloc() */
-       chip->ctrl_urb->transfer_flags = URB_NO_SETUP_DMA_MAP | 
URB_NO_TRANSFER_DMA_MAP;
+       chip->ctrl_urb->transfer_flags = URB_NO_TRANSFER_DMA_MAP;
 
        ret = hdjbulk_submit_urb(chip, chip->ctrl_urb, GFP_KERNEL);
        if (ret!=0) {
@@ -553,7 +553,7 @@
                                output_control_callback,
                                &ubulk->output_control_completion);
        ubulk->output_control_urb->setup_dma = ubulk->output_control_dma;
-       ubulk->output_control_urb->transfer_flags = URB_NO_SETUP_DMA_MAP | 
URB_NO_TRANSFER_DMA_MAP;
+       ubulk->output_control_urb->transfer_flags = URB_NO_TRANSFER_DMA_MAP;
        if ((rc =  hdjbulk_submit_urb(ubulk->chip,ubulk->output_control_urb, 
GFP_KERNEL))!=0) {
                printk(KERN_WARNING"%s hdjbulk_submit_urb() failed, 
rc:%d\n",__FUNCTION__,rc);
        } else {
@@ -2675,7 +2675,12 @@
 {
        if (ubulk->chip->product_code!=DJCONTROLSTEEL_PRODUCT_CODE) {
                if (ubulk->output_control_ctl_req!=NULL && 
ubulk->control_interface!=NULL) {
-                       
usb_buffer_free(interface_to_usbdev(ubulk->control_interface),
+#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36) )
+               usb_free_coherent(
+#else
+               usb_buffer_free(
+#endif
+                                       
interface_to_usbdev(ubulk->control_interface),
                                        
sizeof(*(ubulk->output_control_ctl_req)),
                                        ubulk->output_control_ctl_req,
                                        ubulk->output_control_dma);
@@ -2684,7 +2689,12 @@
 
                if (ubulk->output_control_buffer!=NULL && 
ubulk->control_interface!=NULL &&
                    ubulk->output_control_urb!=NULL) {
-                       
usb_buffer_free(interface_to_usbdev(ubulk->control_interface),
+#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36) )
+               usb_free_coherent(
+#else
+               usb_buffer_free(
+#endif
+                                       
interface_to_usbdev(ubulk->control_interface),
                                        
ubulk->output_control_urb->transfer_buffer_length,
                                        ubulk->output_control_buffer,
                                        
ubulk->output_control_urb->transfer_dma);
@@ -2712,7 +2722,12 @@
                usb_kill_urb(ubulk->bulk_out_urb);
                if (free_urbs!=0) {
                        if (ubulk->bulk_out_buffer!=NULL) {
-                               usb_buffer_free(ubulk->chip->dev, 
ubulk->bulk_out_size,
+#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36) )
+               usb_free_coherent(
+#else
+               usb_buffer_free(
+#endif
+                                               ubulk->chip->dev, 
ubulk->bulk_out_size,
                                                
ubulk->bulk_out_urb->transfer_buffer,
                                                
ubulk->bulk_out_urb->transfer_dma);
                                ubulk->bulk_out_buffer = NULL;
@@ -3065,7 +3080,12 @@
        init_MUTEX(&ubulk->bulk_out_buffer_mutex);
        
        ubulk->bulk_out_buffer =
-               usb_buffer_alloc(ubulk->chip->dev, ubulk->bulk_out_size,
+#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36) )
+               usb_alloc_coherent(
+#else
+               usb_buffer_alloc(
+#endif
+                       ubulk->chip->dev, ubulk->bulk_out_size,
                        GFP_KERNEL, &ubulk->bulk_out_urb->transfer_dma);
 
        if (ubulk->bulk_out_buffer==NULL) {
@@ -3609,7 +3629,13 @@
         *  control state */
        if (ubulk->chip->product_code != DJCONTROLSTEEL_PRODUCT_CODE) { 
                /* allocate memory for setup packet for our control requests */
-               ubulk->output_control_ctl_req = 
usb_buffer_alloc(interface_to_usbdev(ubulk->control_interface), 
+               ubulk->output_control_ctl_req = 
+#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36) )
+               usb_alloc_coherent(
+#else
+               usb_buffer_alloc(
+#endif
+                                                               
interface_to_usbdev(ubulk->control_interface), 
                                                                
sizeof(*(ubulk->output_control_ctl_req)),
                                                                GFP_KERNEL, 
                                                                 
&ubulk->output_control_dma);
@@ -3628,7 +3654,13 @@
                        goto hdjbulk_init_output_control_state_error;
                }
 
-               ubulk->output_control_buffer = 
usb_buffer_alloc(interface_to_usbdev(ubulk->control_interface),
+               ubulk->output_control_buffer = 
+#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36) )
+               usb_alloc_coherent(
+#else
+               usb_buffer_alloc(
+#endif
+                                                               
interface_to_usbdev(ubulk->control_interface),
                                                                
ubulk->output_control_buffer_size, 
                                                                GFP_KERNEL,
                                                                
&ubulk->output_control_urb->transfer_dma);
@@ -3773,7 +3805,13 @@
                }
 
                ep[i]->max_transfer = ubulk->continuous_reader_packet_size;
-               buffer = usb_buffer_alloc(ubulk->chip->dev, ep[i]->max_transfer,
+               buffer = 
+#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36) )
+               usb_alloc_coherent(
+#else
+               usb_buffer_alloc(
+#endif
+                                       ubulk->chip->dev, ep[i]->max_transfer,
                                        GFP_KERNEL, &ep[i]->urb->transfer_dma);
                if (!buffer) {
                        printk(KERN_WARNING"%s() usb_buffer_alloc() 
failed\n",__FUNCTION__);
@@ -4250,7 +4288,12 @@
 {
        if (ep->urb) {
                if (ep->urb->transfer_buffer) {
-                       usb_buffer_free(ep->ubulk->chip->dev, ep->max_transfer,
+#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36) )
+               usb_free_coherent(
+#else
+               usb_buffer_free(
+#endif
+                                       ep->ubulk->chip->dev, ep->max_transfer,
                                        ep->urb->transfer_buffer,
                                        ep->urb->transfer_dma);
                }
diff -Naru hdjmod-1.28.old/device.c hdjmod-1.28/device.c
--- hdjmod-1.28.old/device.c    2009-01-27 15:25:50.000000000 +0100
+++ hdjmod-1.28/device.c        2010-09-26 19:14:55.000000000 +0200
@@ -1559,7 +1559,12 @@
 
        if(chip->ctrl_req_buffer != NULL)
        {
-               usb_buffer_free(chip->dev,
+#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36) )
+               usb_free_coherent(
+#else
+               usb_buffer_free(
+#endif
+                               chip->dev,
                                chip->ctrl_urb->transfer_buffer_length,
                                chip->ctrl_req_buffer,
                                chip->ctrl_urb->transfer_dma);
@@ -1575,7 +1580,12 @@
        
        if(chip->ctl_req != NULL)
        {
-               usb_buffer_free(chip->dev,
+#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36) )
+               usb_free_coherent(
+#else
+               usb_buffer_free(
+#endif
+                       chip->dev,
                        sizeof(*(chip->ctl_req)),
                        chip->ctl_req,
                        chip->ctl_req_dma);
@@ -1728,7 +1738,13 @@
        }
 
        /* allocate memory for setup packet for our control requests */
-       chip->ctl_req = usb_buffer_alloc(chip->dev, 
+       chip->ctl_req =
+#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36) )
+               usb_alloc_coherent(
+#else
+               usb_buffer_alloc(
+#endif
+                                        chip->dev, 
                                         sizeof(*(chip->ctl_req)),
                                         GFP_KERNEL, 
                                         &chip->ctl_req_dma);
@@ -1743,7 +1759,13 @@
 
        chip->ctrl_req_buffer_len =  sizeof(u16);
        chip->ctrl_urb->transfer_buffer_length = chip->ctrl_req_buffer_len;
-       chip->ctrl_req_buffer = usb_buffer_alloc(chip->dev, 
+       chip->ctrl_req_buffer = 
+#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36) )
+               usb_alloc_coherent(
+#else
+               usb_buffer_alloc(
+#endif
+                                                chip->dev, 
                                                 
chip->ctrl_urb->transfer_buffer_length,
                                                 GFP_KERNEL, 
                                                 &chip->ctrl_urb->transfer_dma);
diff -Naru hdjmod-1.28.old/midi.c hdjmod-1.28/midi.c
--- hdjmod-1.28.old/midi.c      2009-01-27 15:25:50.000000000 +0100
+++ hdjmod-1.28/midi.c  2010-09-26 19:38:35.000000000 +0200
@@ -367,7 +367,12 @@
 {
        if (ep->urb) {
                if (ep->urb->transfer_buffer) {
-                       usb_buffer_free(ep->umidi->chip->dev,
+#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36) )
+               usb_free_coherent(
+#else
+               usb_buffer_free(
+#endif
+                                       ep->umidi->chip->dev,
                                        ep->urb->transfer_buffer_length,
                                        ep->urb->transfer_buffer,
                                        ep->urb->transfer_dma);
@@ -503,7 +508,13 @@
                pipe = usb_rcvbulkpipe(umidi->chip->dev, ep_info->in_ep);
        }
        length = usb_maxpacket(umidi->chip->dev, pipe, 0);
-       buffer = usb_buffer_alloc(umidi->chip->dev, length, GFP_KERNEL,
+       buffer = 
+#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36) )
+               usb_alloc_coherent(
+#else
+               usb_buffer_alloc(
+#endif
+                                 umidi->chip->dev, length, GFP_KERNEL,
                                  &ep->urb->transfer_dma);
        if (!buffer) {
                snd_printk(KERN_WARNING"%s() usb_buffer_alloc 
failed\n",__FUNCTION__);
@@ -536,7 +547,12 @@
 #endif
        if (ep->urb) {
                if (ep->urb->transfer_buffer) {
-                       usb_buffer_free(ep->umidi->chip->dev, ep->max_transfer,
+#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36) )
+               usb_free_coherent(
+#else
+               usb_buffer_free(
+#endif
+                                       ep->umidi->chip->dev, ep->max_transfer,
                                        ep->urb->transfer_buffer,
                                        ep->urb->transfer_dma);
                }
@@ -544,27 +560,47 @@
        }
        if (ep->urb_led) {
                if (ep->urb_led->transfer_buffer) {
-                       usb_buffer_free(ep->umidi->chip->dev, ep->max_transfer,
+#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36) )
+               usb_free_coherent(
+#else
+               usb_buffer_free(
+#endif
+                                       ep->umidi->chip->dev, ep->max_transfer,
                                        ep->urb_led->transfer_buffer,
                                        ep->urb_led->transfer_dma);
                }
                usb_free_urb(ep->urb_led);      
        }
        if (ep->ctrl_req_led) {
-               usb_buffer_free(ep->umidi->chip->dev, 
sizeof(*(ep->ctrl_req_led)),
+#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36) )
+               usb_free_coherent(
+#else
+               usb_buffer_free(
+#endif
+                                               ep->umidi->chip->dev, 
sizeof(*(ep->ctrl_req_led)),
                                                ep->ctrl_req_led, 
ep->ctrl_req_led_dma);
        }
        if (ep->controller_state) {
                if (ep->controller_state->output_control_ctl_urb &&
                         
ep->controller_state->output_control_ctl_urb->transfer_buffer &&
                         
ep->controller_state->output_control_ctl_urb->transfer_dma) {
-                       usb_buffer_free(ep->umidi->chip->dev, ep->max_transfer,
+#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36) )
+               usb_free_coherent(
+#else
+               usb_buffer_free(
+#endif
+                                       ep->umidi->chip->dev, ep->max_transfer,
                                        
ep->controller_state->output_control_ctl_urb->transfer_buffer,
                                        
ep->controller_state->output_control_ctl_urb->transfer_dma);
                }
                if (ep->controller_state->output_control_ctl_req &&
                         ep->controller_state->output_control_ctl_dma) {
-                       usb_buffer_free(ep->umidi->chip->dev, 
+#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36) )
+               usb_free_coherent(
+#else
+               usb_buffer_free(
+#endif
+                                       ep->umidi->chip->dev, 
                                        
sizeof(*(ep->controller_state->output_control_ctl_req)),
                                        
ep->controller_state->output_control_ctl_req,
                                        
ep->controller_state->output_control_ctl_dma);
@@ -573,7 +609,12 @@
                        
usb_free_urb(ep->controller_state->output_control_ctl_urb);
                }
                if (ep->controller_state->ctl_req) {
-                       usb_buffer_free(ep->umidi->chip->dev, 
+#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36) )
+               usb_free_coherent(
+#else
+               usb_buffer_free(
+#endif
+                                       ep->umidi->chip->dev, 
                                        
sizeof(*(ep->controller_state->ctl_req)),
                                        ep->controller_state->ctl_req,
                                        ep->controller_state->ctl_req_dma);
@@ -584,14 +625,24 @@
                }
                if (ep->controller_state->urb_kt) {
                        if (ep->controller_state->urb_kt->transfer_buffer) {
-                               usb_buffer_free(ep->umidi->chip->dev, 
ep->max_transfer,
+#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36) )
+               usb_free_coherent(
+#else
+               usb_buffer_free(
+#endif
+                                               ep->umidi->chip->dev, 
ep->max_transfer,
                                                
ep->controller_state->urb_kt->transfer_buffer,
                                                
ep->controller_state->urb_kt->transfer_dma);
                        }
                        usb_free_urb(ep->controller_state->urb_kt);
                }
                if (ep->controller_state->ctl_req_kt) {
-                       usb_buffer_free(ep->umidi->chip->dev, 
+#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36) )
+               usb_free_coherent(
+#else
+               usb_buffer_free(
+#endif
+                                       ep->umidi->chip->dev, 
                                        
sizeof(*(ep->controller_state->ctl_req_kt)),
                                        ep->controller_state->ctl_req_kt,
                                        ep->controller_state->ctl_req_dma_kt);
@@ -666,7 +717,13 @@
                controller_state->is_weltrend = 
is_mp3_weltrend(ep->umidi->chip->usb_id);
        }
        
-       controller_state->ctl_req = usb_buffer_alloc(ep->umidi->chip->dev, 
+       controller_state->ctl_req = 
+#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36) )
+               usb_alloc_coherent(
+#else
+               usb_buffer_alloc(
+#endif
+                                                       ep->umidi->chip->dev, 
                                                        
sizeof(*(controller_state->ctl_req)),
                                                        GFP_KERNEL, 
                                                        
&controller_state->ctl_req_dma);
@@ -679,7 +736,13 @@
         *  mouse setting or setting LEDs */
        init_MUTEX(&controller_state->output_control_ctl_mutex);
        init_completion(&controller_state->output_control_ctl_completion);
-       controller_state->output_control_ctl_req = 
usb_buffer_alloc(ep->umidi->chip->dev, 
+       controller_state->output_control_ctl_req = 
+#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36) )
+               usb_alloc_coherent(
+#else
+               usb_buffer_alloc(
+#endif
+                                                       ep->umidi->chip->dev, 
                                                        
sizeof(*(controller_state->output_control_ctl_req)),
                                                        GFP_KERNEL, 
                                                        
&controller_state->output_control_ctl_dma);
@@ -700,7 +763,13 @@
        max_transfer = usb_maxpacket(ep->umidi->chip->dev, 
                                        
controller_state->output_control_ctl_pipe, 1);
        
-       buffer = usb_buffer_alloc(ep->umidi->chip->dev, max_transfer,
+       buffer = 
+#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36) )
+               usb_alloc_coherent(
+#else
+               usb_buffer_alloc(
+#endif
+                                 ep->umidi->chip->dev, max_transfer,
                                  GFP_KERNEL, 
&controller_state->output_control_ctl_urb->transfer_dma);
        if (buffer==NULL) {
                snd_printk(KERN_WARNING"%s() usb_buffer_alloc failed (general 
URB buffer)\n",
@@ -727,7 +796,7 @@
        controller_state->output_control_ctl_req->wLength = 
cpu_to_le16(DJ_MP3_HID_OUTPUT_REPORT_LEN);
        controller_state->output_control_ctl_urb->setup_dma = 
controller_state->output_control_ctl_dma;
        /* NOTE: transfer_dma setup above in call to usb_buffer_alloc() */
-       controller_state->output_control_ctl_urb->transfer_flags = 
URB_NO_SETUP_DMA_MAP | URB_NO_TRANSFER_DMA_MAP;
+       controller_state->output_control_ctl_urb->transfer_flags = 
URB_NO_TRANSFER_DMA_MAP;
        
        return 0;
 }
@@ -772,7 +841,13 @@
        }
        
        if (ep->umidi->chip->caps.leds_hid_controlled) {
-               ep->ctrl_req_led = usb_buffer_alloc(ep->umidi->chip->dev, 
+               ep->ctrl_req_led = 
+#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36) )
+               usb_alloc_coherent(
+#else
+               usb_buffer_alloc(
+#endif
+                                                               
ep->umidi->chip->dev, 
                                                                
sizeof(*(ep->ctrl_req_led)),
                                                                GFP_KERNEL, 
                                                                
&ep->ctrl_req_led_dma);
@@ -806,7 +881,13 @@
                pipe = usb_sndctrlpipe(umidi->chip->dev, 0);
        }
        ep->max_transfer = usb_maxpacket(umidi->chip->dev, pipe, 1);
-       buffer = usb_buffer_alloc(umidi->chip->dev, ep->max_transfer,
+       buffer = 
+#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36) )
+               usb_alloc_coherent(
+#else
+               usb_buffer_alloc(
+#endif
+                                 umidi->chip->dev, ep->max_transfer,
                                  GFP_KERNEL, &ep->urb->transfer_dma);
        if (!buffer) {
                snd_printk(KERN_WARNING"%s() usb_buffer_alloc() 
failed\n",__FUNCTION__);
@@ -814,7 +895,13 @@
                return -ENOMEM;
        }
        
-       buffer_led = usb_buffer_alloc(umidi->chip->dev, ep->max_transfer,
+       buffer_led = 
+#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36) )
+               usb_alloc_coherent(
+#else
+               usb_buffer_alloc(
+#endif
+                                 umidi->chip->dev, ep->max_transfer,
                                  GFP_KERNEL, &ep->urb_led->transfer_dma);
        if (!buffer_led) {
                snd_printk(KERN_WARNING"%s() usb_buffer_alloc() failed for LED 
buffer\n",
@@ -854,7 +941,7 @@
                ep->controller_state->ctl_req->wLength = 
cpu_to_le16(DJ_MP3_HID_OUTPUT_REPORT_LEN);
                ep->urb->setup_dma = ep->controller_state->ctl_req_dma;
                /* NOTE: transfer_dma setup above in call to usb_buffer_alloc() 
*/
-               ep->urb->transfer_flags = URB_NO_SETUP_DMA_MAP | 
URB_NO_TRANSFER_DMA_MAP;
+               ep->urb->transfer_flags = URB_NO_TRANSFER_DMA_MAP;
        }
        
        if (ep->umidi->chip->caps.leds_hid_controlled) {
@@ -875,7 +962,7 @@
                ep->ctrl_req_led->wLength = 
cpu_to_le16(DJ_MP3_HID_OUTPUT_REPORT_LEN);
                ep->urb_led->setup_dma = ep->ctrl_req_led_dma;
                /* NOTE: transfer_dma setup above in call to usb_buffer_alloc() 
*/
-               ep->urb_led->transfer_flags = URB_NO_SETUP_DMA_MAP | 
URB_NO_TRANSFER_DMA_MAP;
+               ep->urb_led->transfer_flags = URB_NO_TRANSFER_DMA_MAP;
        }
        
        if (ep->umidi->chip->caps.leds_bulk_controlled) {
@@ -913,7 +1000,13 @@
                        return -ENOMEM;
                }
 
-               buffer = usb_buffer_alloc(umidi->chip->dev, ep->max_transfer,
+               buffer = 
+#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36) )
+               usb_alloc_coherent(
+#else
+               usb_buffer_alloc(
+#endif
+                                 umidi->chip->dev, ep->max_transfer,
                                  GFP_KERNEL, 
&ep->controller_state->urb_kt->transfer_dma);
                if (!buffer) {
                        snd_printk(KERN_WARNING"%s() usb_buffer_alloc() for wq 
failed\n",__FUNCTION__);
@@ -921,7 +1014,13 @@
                        return -ENOMEM;
                }
 
-               ep->controller_state->ctl_req_kt = 
usb_buffer_alloc(umidi->chip->dev, 
+               ep->controller_state->ctl_req_kt = 
+#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36) )
+               usb_alloc_coherent(
+#else
+               usb_buffer_alloc(
+#endif
+                                                       umidi->chip->dev, 
                                                        
sizeof(*(ep->controller_state->ctl_req_kt)),
                                                        GFP_KERNEL, 
                                                        
&ep->controller_state->ctl_req_dma_kt);
@@ -947,7 +1046,7 @@
                ep->controller_state->ctl_req_kt->wLength = 
cpu_to_le16(DJ_MP3_HID_OUTPUT_REPORT_LEN);
                ep->controller_state->urb_kt->setup_dma = 
ep->controller_state->ctl_req_dma_kt;
                /* NOTE: transfer_dma setup above in call to usb_buffer_alloc() 
*/
-               ep->controller_state->urb_kt->transfer_flags = 
URB_NO_SETUP_DMA_MAP | URB_NO_TRANSFER_DMA_MAP;
+               ep->controller_state->urb_kt->transfer_flags = 
URB_NO_TRANSFER_DMA_MAP;
        
                init_completion(&ep->controller_state->ctl_req_completion_kt);
                init_completion(&ep->controller_state->mp3w_kthread_started);
++++++ hdjmod_kernel_2.6.37.patch ++++++
diff -Naru hdjmod-1.28o/bulk.c hdjmod-1.28/bulk.c
--- hdjmod-1.28o/bulk.c 2009-01-27 15:25:50.000000000 +0100
+++ hdjmod-1.28/bulk.c  2012-04-06 22:53:14.000000000 +0200
@@ -34,6 +34,9 @@
 #include <linux/usb.h>
 #include <linux/delay.h>
 #include <linux/version.h>     /* For LINUX_VERSION_CODE */
+#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37) )
+#include <linux/semaphore.h>
+#endif
 #if ( LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,24) )
 #include <sound/driver.h>
 #endif
@@ -3062,7 +3065,11 @@
                goto hdj_create_bulk_interface_error;
        }
        /* allocate the buffer for bulk_out_urb */
+#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37) )
+       sema_init(&ubulk->bulk_out_buffer_mutex,1);
+#else
        init_MUTEX(&ubulk->bulk_out_buffer_mutex);
+#endif
        
        ubulk->bulk_out_buffer =
                usb_buffer_alloc(ubulk->chip->dev, ubulk->bulk_out_size,
@@ -3601,7 +3608,11 @@
                return -EINVAL;
        }
 
+#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37) )
+       sema_init(&ubulk->output_control_mutex,1);
+#else
        init_MUTEX(&ubulk->output_control_mutex);
+#endif
        init_completion(&ubulk->output_control_completion);
 
        /* Every product here except the Steel targets HID.  Since the steel 
does not target HID, we don't
@@ -3855,7 +3866,11 @@
        u16 value = 0;
        struct hdj_console_context *dc = ((struct hdj_console_context 
*)ubulk->device_context);
 
+#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37) )
+       sema_init(&dc->device_config_mutex,1);
+#else
        init_MUTEX(&dc->device_config_mutex);
+#endif
        
        ret = hdjbulk_init_common_context(ubulk,&ubulk->hdj_common);
        if (ret!=0) {
@@ -4133,7 +4148,11 @@
 
        spin_lock_init(&dc->bulk_buffer_lock);
        init_completion(&dc->bulk_request_completion);
+#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37) )
+       sema_init(&dc->bulk_request_mutex,1);
+#else
        init_MUTEX(&dc->bulk_request_mutex);
+#endif
 
        if ((ret = init_continuous_reader(ubulk))!=0) {
                printk(KERN_WARNING"%s() init_continuous_reader() failed, 
rc:%d\n",
diff -Naru hdjmod-1.28o/device.c hdjmod-1.28/device.c
--- hdjmod-1.28o/device.c       2009-01-27 15:25:50.000000000 +0100
+++ hdjmod-1.28/device.c        2012-04-06 22:54:53.000000000 +0200
@@ -36,6 +36,9 @@
 #include <linux/netlink.h>
 #include <net/sock.h>
 #include <linux/usb.h>
+#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37) )
+#include <linux/semaphore.h>
+#endif
 #if ( LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,24) )
 #include <sound/driver.h>
 #endif
@@ -66,7 +69,11 @@
 module_param_array(id, charp, NULL, 0444);
 MODULE_PARM_DESC(id, "ID string for the Hercules DJ Series adapter.");
 
+#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37) )
+static DEFINE_SEMAPHORE(register_mutex);
+#else
 static DECLARE_MUTEX(register_mutex);
+#endif
 static struct snd_hdj_chip *usb_chip[SNDRV_CARDS];
 
 /* reference count for the socket */
@@ -1682,7 +1689,11 @@
        chip->card = card;
        chip->product_code = product_code;
 
+#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37) )
+       sema_init(&chip->vendor_request_mutex,1);
+#else
        init_MUTEX(&chip->vendor_request_mutex);
+#endif
 
        /* initialise the atomic variables */
        atomic_set(&chip->locked_io, 0);
@@ -1697,7 +1708,11 @@
        INIT_LIST_HEAD(&chip->bulk_list);
        chip->usb_id = USB_ID(le16_to_cpu(dev->descriptor.idVendor),
                              le16_to_cpu(dev->descriptor.idProduct));
+#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37) )
+       sema_init(&chip->netlink_list_mutex,1);
+#else
        init_MUTEX(&chip->netlink_list_mutex);
+#endif
        INIT_LIST_HEAD(&chip->netlink_registered_processes);
        
        /* fill in DJ capabilities for this device */
diff -Naru hdjmod-1.28o/midi.c hdjmod-1.28/midi.c
--- hdjmod-1.28o/midi.c 2009-01-27 15:25:50.000000000 +0100
+++ hdjmod-1.28/midi.c  2012-04-06 22:55:48.000000000 +0200
@@ -34,6 +34,9 @@
 #include <linux/module.h>
 #include <linux/usb.h>
 #include <linux/kthread.h>
+#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37) )
+#include <linux/semaphore.h>
+#endif
 #include <asm/byteorder.h>
 #include <asm/atomic.h>
 #if ( LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,24) )
@@ -677,7 +680,11 @@
        
        /* this buffer and URB below are for general control requests, like 
changing the
         *  mouse setting or setting LEDs */
+#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37) )
+       sema_init(&controller_state->output_control_ctl_mutex, 1);
+#else
        init_MUTEX(&controller_state->output_control_ctl_mutex);
+#endif
        init_completion(&controller_state->output_control_ctl_completion);
        controller_state->output_control_ctl_req = 
usb_buffer_alloc(ep->umidi->chip->dev, 
                                                        
sizeof(*(controller_state->output_control_ctl_req)),
++++++ hdjmod_kernel_2.6.39.patch ++++++
diff -Naru hdjmod-1.28o/midi.c hdjmod-1.28/midi.c
--- hdjmod-1.28o/midi.c 2009-01-27 15:25:50.000000000 +0100
+++ hdjmod-1.28/midi.c  2011-05-30 21:47:18.000000000 +0200
@@ -60,7 +60,7 @@
 
 unsigned long channel_list_initialized = 0;
 struct midi_channel_elem channel_list[NUM_MIDI_CHANNELS];
-spinlock_t channel_list_lock = SPIN_LOCK_UNLOCKED;
+DEFINE_SPINLOCK(channel_list_lock);
 
 static struct usb_protocol_ops snd_hdjmidi_standard_ops = {
        .input = snd_hdjmidi_standard_input,
++++++ hdjmod_kernel_3.6.patch ++++++
diff -Naru hdjmod-1.28o/device.c hdjmod-1.28/device.c
--- hdjmod-1.28o/device.c       2009-01-27 15:25:50.000000000 +0100
+++ hdjmod-1.28/device.c        2012-10-16 21:52:40.000000000 +0200
@@ -2393,6 +2393,13 @@
        /* Try to allocate a netlink socket minimizing the risk of collision, 
         *  by starting at the max unit number and counting down */
        for (unit=MAX_LINKS-1;unit>MIN_NETLINK_UNIT;unit--) {
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0)
+               nl_sk = netlink_kernel_create(
+                                                                       
&init_net,
+                                                                       unit,
+                                                                       
THIS_MODULE,
+                                                                       NULL);
+#else
                nl_sk = netlink_kernel_create(
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24)
                                                                        
&init_net,
@@ -2404,6 +2411,7 @@
                                                                        NULL,
 #endif
                                                                        
THIS_MODULE);
+#endif
                if (nl_sk!=NULL) {
                        netlink_unit = unit;
                        return 0;
@@ -2469,6 +2477,20 @@
                return NULL;
        }
 
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0)
+       nlh = nlmsg_put(skb, target_pid, seq, t, size, flags);
+       if(!nlh) {
+               if (skb) {
+                       kfree_skb(skb);
+               }
+               return NULL;
+       }
+       data             = nlmsg_data(nlh);
+       if (size > 0) {
+               memcpy(data, payload, size);
+       }
+       return skb;
+#else
        nlh              = NLMSG_PUT(skb, target_pid, seq, t, size);
        nlh->nlmsg_flags = flags;
        data             = NLMSG_DATA(nlh);
@@ -2482,6 +2504,7 @@
                kfree_skb(skb);
        }
        return NULL;
+#endif
 }
 
 int register_for_netlink(struct snd_hdj_chip* chip, 
++++++ hdjmod_kernel_3.7.patch ++++++
diff -aru hdjmod-1.28o/device.c hdjmod-1.28/device.c
--- hdjmod-1.28o/device.c       2012-12-23 17:41:13.111607777 +0100
+++ hdjmod-1.28/device.c        2012-12-23 17:42:33.115898437 +0100
@@ -2397,7 +2397,9 @@
                nl_sk = netlink_kernel_create(
                                                                        
&init_net,
                                                                        unit,
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,7,0)
                                                                        
THIS_MODULE,
+#endif
                                                                        NULL);
 #else
                nl_sk = netlink_kernel_create(
Nur in hdjmod-1.28: .device.c.swp.
++++++ preamble ++++++
Requires: kernel-%1
-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to