Merge remote-tracking branch 'mkp-scsi/4.7/scsi-fixes' into fixes
[deliverable/linux.git] / drivers / staging / comedi / comedi_usb.h
1 /*
2 * comedi_usb.h
3 * header file for USB Comedi drivers
4 *
5 * COMEDI - Linux Control and Measurement Device Interface
6 * Copyright (C) 1997-2000 David A. Schleef <ds@schleef.org>
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 */
18
19 #ifndef _COMEDI_USB_H
20 #define _COMEDI_USB_H
21
22 #include <linux/usb.h>
23
24 #include "comedidev.h"
25
26 struct usb_interface *comedi_to_usb_interface(struct comedi_device *);
27 struct usb_device *comedi_to_usb_dev(struct comedi_device *);
28
29 int comedi_usb_auto_config(struct usb_interface *, struct comedi_driver *,
30 unsigned long context);
31 void comedi_usb_auto_unconfig(struct usb_interface *);
32
33 int comedi_usb_driver_register(struct comedi_driver *, struct usb_driver *);
34 void comedi_usb_driver_unregister(struct comedi_driver *, struct usb_driver *);
35
36 /**
37 * module_comedi_usb_driver() - Helper macro for registering a comedi USB driver
38 * @__comedi_driver: comedi_driver struct
39 * @__usb_driver: usb_driver struct
40 *
41 * Helper macro for comedi USB drivers which do not do anything special
42 * in module init/exit. This eliminates a lot of boilerplate. Each
43 * module may only use this macro once, and calling it replaces
44 * module_init() and module_exit()
45 */
46 #define module_comedi_usb_driver(__comedi_driver, __usb_driver) \
47 module_driver(__comedi_driver, comedi_usb_driver_register, \
48 comedi_usb_driver_unregister, &(__usb_driver))
49
50 #endif /* _COMEDI_USB_H */
This page took 0.037106 seconds and 5 git commands to generate.