a687dc9b579fd0fb0387ab584d828acc19f274e4
[safe/jmp/linux-2.6] / drivers / staging / line6 / config.h
1 /*
2  * Line6 Linux USB driver - 0.8.0
3  *
4  * Copyright (C) 2004-2009 Markus Grabner (grabner@icg.tugraz.at)
5  *
6  *      This program is free software; you can redistribute it and/or
7  *      modify it under the terms of the GNU General Public License as
8  *      published by the Free Software Foundation, version 2.
9  *
10  */
11
12 #ifndef CONFIG_H
13 #define CONFIG_H
14
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
23 #define DEBUG 1
24 #endif
25
26
27 /**
28    Development tools.
29 */
30 #define DO_DEBUG_MESSAGES    0
31 #define DO_DUMP_URB_SEND     DO_DEBUG_MESSAGES
32 #define DO_DUMP_URB_RECEIVE  DO_DEBUG_MESSAGES
33 #define DO_DUMP_PCM_SEND     0
34 #define DO_DUMP_PCM_RECEIVE  0
35 #define DO_DUMP_MIDI_SEND    DO_DEBUG_MESSAGES
36 #define DO_DUMP_MIDI_RECEIVE DO_DEBUG_MESSAGES
37 #define DO_DUMP_ANY          (DO_DUMP_URB_SEND || DO_DUMP_URB_RECEIVE || \
38                               DO_DUMP_PCM_SEND || DO_DUMP_PCM_RECEIVE || \
39                               DO_DUMP_MIDI_SEND || DO_DUMP_MIDI_RECEIVE)
40 #define CREATE_RAW_FILE      0
41
42 #if DO_DEBUG_MESSAGES
43 #define CHECKPOINT printk("line6usb: %s (%s:%d)\n", __FUNCTION__, __FILE__, __LINE__)
44 #endif
45
46 /**
47    In Linux 2.6.20 and later, the pt_regs is no longer passed to USB callback
48    functions.
49 */
50 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 20)
51 #define PT_REGS
52 #else
53 #define PT_REGS , struct pt_regs *regs
54 #endif
55
56 #if DO_DEBUG_MESSAGES
57 #define DEBUG_MESSAGES(x) (x)
58 #else
59 #define DEBUG_MESSAGES(x)
60 #endif
61
62
63 #endif