aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2009-02-27 23:32:10 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2009-04-03 17:54:25 -0400
commit4cb8f302738bd4d1fb5e2b909b735e8826558fbf (patch)
tree98753cda6471857ac542349e7220a7ea5a64109d /drivers
parent0c7ab1580f82d882478db61467005693b4b4c063 (diff)
Staging: line6: remove KERNEL_VERSION checks
As the code is in the kernel tree, it's no longer needed. Cc: Markus Grabner <grabner@icg.tugraz.at> Cc: Mariusz Kozlowski <m.kozlowski@tuxland.pl> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/line6/capture.c3
-rw-r--r--drivers/staging/line6/config.h6
-rw-r--r--drivers/staging/line6/driver.c3
-rw-r--r--drivers/staging/line6/driver.h6
-rw-r--r--drivers/staging/line6/pcm.c8
-rw-r--r--drivers/staging/line6/playback.c3
-rw-r--r--drivers/staging/line6/pod.c10
-rw-r--r--drivers/staging/line6/usbdefs.h10
8 files changed, 0 insertions, 49 deletions
diff --git a/drivers/staging/line6/capture.c b/drivers/staging/line6/capture.c
index 96ed08a06b99..6660c0b4cc5c 100644
--- a/drivers/staging/line6/capture.c
+++ b/drivers/staging/line6/capture.c
@@ -88,9 +88,6 @@ static void unlink_audio_in_urbs(struct snd_line6_pcm *line6pcm)
88 if(test_bit(i, &line6pcm->active_urb_in)) { 88 if(test_bit(i, &line6pcm->active_urb_in)) {
89 if(!test_and_set_bit(i, &line6pcm->unlink_urb_in)) { 89 if(!test_and_set_bit(i, &line6pcm->unlink_urb_in)) {
90 struct urb *u = line6pcm->urb_audio_in[i]; 90 struct urb *u = line6pcm->urb_audio_in[i];
91#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 14)
92 u->transfer_flags |= URB_ASYNC_UNLINK;
93#endif
94 usb_unlink_urb(u); 91 usb_unlink_urb(u);
95 } 92 }
96 } 93 }
diff --git a/drivers/staging/line6/config.h b/drivers/staging/line6/config.h
index 205e697fa90c..8cefdbac9d22 100644
--- a/drivers/staging/line6/config.h
+++ b/drivers/staging/line6/config.h
@@ -13,12 +13,6 @@
13#define CONFIG_H 13#define CONFIG_H
14 14
15 15
16#include <linux/version.h>
17
18#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 19)
19#include <linux/config.h>
20#endif
21
22#ifdef CONFIG_USB_DEBUG 16#ifdef CONFIG_USB_DEBUG
23#define DEBUG 1 17#define DEBUG 1
24#endif 18#endif
diff --git a/drivers/staging/line6/driver.c b/drivers/staging/line6/driver.c
index 7c20783b3e58..cf01abcc4676 100644
--- a/drivers/staging/line6/driver.c
+++ b/drivers/staging/line6/driver.c
@@ -1000,9 +1000,6 @@ static void line6_disconnect(struct usb_interface *interface)
1000} 1000}
1001 1001
1002static struct usb_driver line6_driver = { 1002static struct usb_driver line6_driver = {
1003#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 16)
1004 .owner = THIS_MODULE,
1005#endif
1006 .name = DRIVER_NAME, 1003 .name = DRIVER_NAME,
1007 .probe = line6_probe, 1004 .probe = line6_probe,
1008 .disconnect = line6_disconnect, 1005 .disconnect = line6_disconnect,
diff --git a/drivers/staging/line6/driver.h b/drivers/staging/line6/driver.h
index dc081b6cd913..20966534259d 100644
--- a/drivers/staging/line6/driver.h
+++ b/drivers/staging/line6/driver.h
@@ -18,16 +18,10 @@
18#include <linux/spinlock.h> 18#include <linux/spinlock.h>
19#include <linux/usb.h> 19#include <linux/usb.h>
20#include <linux/wait.h> 20#include <linux/wait.h>
21
22#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 25)
23#include <sound/driver.h>
24#endif
25
26#include <sound/core.h> 21#include <sound/core.h>
27 22
28#include "midi.h" 23#include "midi.h"
29 24
30
31#define DRIVER_NAME "line6usb" 25#define DRIVER_NAME "line6usb"
32 26
33#define LINE6_TIMEOUT 1 27#define LINE6_TIMEOUT 1
diff --git a/drivers/staging/line6/pcm.c b/drivers/staging/line6/pcm.c
index 725184b2f308..489d398e65bb 100644
--- a/drivers/staging/line6/pcm.c
+++ b/drivers/staging/line6/pcm.c
@@ -26,9 +26,6 @@
26int snd_line6_trigger(struct snd_pcm_substream *substream, int cmd) 26int snd_line6_trigger(struct snd_pcm_substream *substream, int cmd)
27{ 27{
28 struct snd_line6_pcm *line6pcm = snd_pcm_substream_chip(substream); 28 struct snd_line6_pcm *line6pcm = snd_pcm_substream_chip(substream);
29#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22)
30 struct list_head *pos;
31#endif
32 struct snd_pcm_substream *s; 29 struct snd_pcm_substream *s;
33 int err; 30 int err;
34 unsigned long flags; 31 unsigned long flags;
@@ -36,12 +33,7 @@ int snd_line6_trigger(struct snd_pcm_substream *substream, int cmd)
36 spin_lock_irqsave(&line6pcm->lock_trigger, flags); 33 spin_lock_irqsave(&line6pcm->lock_trigger, flags);
37 clear_bit(BIT_PREPARED, &line6pcm->flags); 34 clear_bit(BIT_PREPARED, &line6pcm->flags);
38 35
39#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22)
40 snd_pcm_group_for_each(pos, substream) {
41 s = snd_pcm_group_substream_entry(pos);
42#else
43 snd_pcm_group_for_each_entry(s, substream) { 36 snd_pcm_group_for_each_entry(s, substream) {
44#endif
45 switch(s->stream) { 37 switch(s->stream) {
46 case SNDRV_PCM_STREAM_PLAYBACK: 38 case SNDRV_PCM_STREAM_PLAYBACK:
47 err = snd_line6_playback_trigger(s, cmd); 39 err = snd_line6_playback_trigger(s, cmd);
diff --git a/drivers/staging/line6/playback.c b/drivers/staging/line6/playback.c
index 4e36f250d4be..c86e89c59f07 100644
--- a/drivers/staging/line6/playback.c
+++ b/drivers/staging/line6/playback.c
@@ -173,9 +173,6 @@ static void unlink_audio_out_urbs(struct snd_line6_pcm *line6pcm)
173 if(test_bit(i, &line6pcm->active_urb_out)) { 173 if(test_bit(i, &line6pcm->active_urb_out)) {
174 if(!test_and_set_bit(i, &line6pcm->unlink_urb_out)) { 174 if(!test_and_set_bit(i, &line6pcm->unlink_urb_out)) {
175 struct urb *u = line6pcm->urb_audio_out[i]; 175 struct urb *u = line6pcm->urb_audio_out[i];
176#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 14)
177 u->transfer_flags |= URB_ASYNC_UNLINK;
178#endif
179 usb_unlink_urb(u); 176 usb_unlink_urb(u);
180 } 177 }
181 } 178 }
diff --git a/drivers/staging/line6/pod.c b/drivers/staging/line6/pod.c
index af18087f1ed1..eba804f2b17c 100644
--- a/drivers/staging/line6/pod.c
+++ b/drivers/staging/line6/pod.c
@@ -135,15 +135,9 @@ static int pod_version_request_async(struct usb_line6_pod *pod)
135 return line6_send_raw_message_async(&pod->line6, pod->buffer_versionreq, sizeof(pod_request_version)); 135 return line6_send_raw_message_async(&pod->line6, pod->buffer_versionreq, sizeof(pod_request_version));
136} 136}
137 137
138#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 20)
139static void pod_create_files_work(struct work_struct *work) 138static void pod_create_files_work(struct work_struct *work)
140{ 139{
141 struct usb_line6_pod *pod = container_of(work, struct usb_line6_pod, create_files_work); 140 struct usb_line6_pod *pod = container_of(work, struct usb_line6_pod, create_files_work);
142#else
143static void pod_create_files_work(void *work)
144{
145 struct usb_line6_pod *pod = (struct usb_line6_pod *)work;
146#endif
147 141
148 pod_create_files(pod->firmware_version, pod->line6.properties->device_bit, pod->line6.ifcdev); 142 pod_create_files(pod->firmware_version, pod->line6.properties->device_bit, pod->line6.ifcdev);
149} 143}
@@ -351,11 +345,7 @@ void pod_process_message(struct usb_line6_pod *pod)
351 345
352 /* Now we know the firmware version, so we schedule a bottom half 346 /* Now we know the firmware version, so we schedule a bottom half
353 handler to create the special files: */ 347 handler to create the special files: */
354#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 20)
355 INIT_WORK(&pod->create_files_work, pod_create_files_work); 348 INIT_WORK(&pod->create_files_work, pod_create_files_work);
356#else
357 INIT_WORK(&pod->create_files_work, pod_create_files_work, pod);
358#endif
359 queue_work(line6_workqueue, &pod->create_files_work); 349 queue_work(line6_workqueue, &pod->create_files_work);
360 } 350 }
361 else 351 else
diff --git a/drivers/staging/line6/usbdefs.h b/drivers/staging/line6/usbdefs.h
index cbf5d0d62a1f..15dbca757ac4 100644
--- a/drivers/staging/line6/usbdefs.h
+++ b/drivers/staging/line6/usbdefs.h
@@ -13,9 +13,6 @@
13#define USBDEFS_H 13#define USBDEFS_H
14 14
15 15
16#include <linux/version.h>
17
18
19#define LINE6_VENDOR_ID 0x0e41 16#define LINE6_VENDOR_ID 0x0e41
20 17
21#define USB_INTERVALS_PER_SECOND 1000 18#define USB_INTERVALS_PER_SECOND 1000
@@ -65,11 +62,4 @@
65#define LINE6_FALLBACK_INTERVAL 10 62#define LINE6_FALLBACK_INTERVAL 10
66#define LINE6_FALLBACK_MAXPACKETSIZE 16 63#define LINE6_FALLBACK_MAXPACKETSIZE 16
67 64
68
69#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 18)
70#define usb_interrupt_msg(usb_dev, pipe, data, len, actual_length, timeout) \
71usb_bulk_msg(usb_dev, pipe, data, len, actual_length, timeout)
72#endif
73
74
75#endif 65#endif