2 * Line6 Linux USB driver - 0.8.0
4 * Copyright (C) 2004-2009 Markus Grabner (grabner@icg.tugraz.at)
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.
16 #include <linux/version.h>
18 #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 19)
19 #include <linux/config.h>
22 #ifdef CONFIG_USB_DEBUG
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
43 #define CHECKPOINT printk("line6usb: %s (%s:%d)\n", __FUNCTION__, __FILE__, __LINE__)
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).
50 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 13)
51 #define DEVICE_ATTRIBUTE struct device_attribute *attr,
53 #define DEVICE_ATTRIBUTE
57 In Linux 2.6.20 and later, the pt_regs is no longer passed to USB callback
60 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 20)
63 #define PT_REGS , struct pt_regs *regs
67 #define DEBUG_MESSAGES(x) (x)
69 #define DEBUG_MESSAGES(x)