]> git.karo-electronics.de Git - karo-tx-linux.git/blob - drivers/staging/line6/config.h
Staging: add line6 usb driver
[karo-tx-linux.git] / 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.13 and later, the device_attribute is passed to the sysfs
48    get/set functions (see /usr/src/linux/include/linux/device.h).
49 */
50 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 13)
51 #define DEVICE_ATTRIBUTE struct device_attribute *attr,
52 #else
53 #define DEVICE_ATTRIBUTE
54 #endif
55
56 /**
57    In Linux 2.6.20 and later, the pt_regs is no longer passed to USB callback
58    functions.
59 */
60 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 20)
61 #define PT_REGS
62 #else
63 #define PT_REGS , struct pt_regs *regs
64 #endif
65
66 #if DO_DEBUG_MESSAGES
67 #define DEBUG_MESSAGES(x) (x)
68 #else
69 #define DEBUG_MESSAGES(x)
70 #endif
71
72
73 #endif