Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:42.2:Update
hdjmod
hdjmod_kernel_2.6.37.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File hdjmod_kernel_2.6.37.patch of Package hdjmod
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)),
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor