forked from luck/tmp_suning_uos_patched
5c7e7d586a
Use the device-id table and a private flag to determine the device type (US122 or US144) rather than spreading product-id conditionals throughout the driver. This USB driver currently depends on X86 (why?), but we should still add the missing endianness conversions when accessing the USB device-descriptor fields. Compile-tested only. Signed-off-by: Johan Hovold <johan@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
34 lines
559 B
C
34 lines
559 B
C
#ifndef US122L_H
|
|
#define US122L_H
|
|
|
|
|
|
struct us122l {
|
|
struct usb_device *dev;
|
|
int card_index;
|
|
int stride;
|
|
struct usb_stream_kernel sk;
|
|
|
|
struct mutex mutex;
|
|
struct file *first;
|
|
unsigned second_periods_polled;
|
|
struct file *master;
|
|
struct file *slave;
|
|
struct list_head midi_list;
|
|
|
|
atomic_t mmap_count;
|
|
|
|
bool is_us144;
|
|
};
|
|
|
|
|
|
#define US122L(c) ((struct us122l *)(c)->private_data)
|
|
|
|
#define NAME_ALLCAPS "US-122L"
|
|
|
|
#define USB_ID_US122L 0x800E
|
|
#define USB_ID_US144 0x800F
|
|
#define USB_ID_US122MKII 0x8021
|
|
#define USB_ID_US144MKII 0x8020
|
|
|
|
#endif
|