diff options
author | Ian Abbott <abbotti@mev.co.uk> | 2015-01-27 17:49:09 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-01-28 11:18:51 -0800 |
commit | c7d623d3695ae5c193f08d2346c936c24f56dd4c (patch) | |
tree | ab7448278d6390d87ff9f52e7e3fca9cb00fde3e /drivers/staging/comedi | |
parent | cf7661c74e2a051132f64440fc40cd46c06b60dc (diff) |
staging: comedi: comedi_usb.h: move USB stuff out of comedidev.h
Move the USB-specific stuff out of "comedidev.h" into "comedi_usb.h".
Comedi USB drivers now include "comedi_usb.h" instead of "comedidev.h",
which now gets pulled in indirectly.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/comedi')
-rw-r--r-- | drivers/staging/comedi/comedi_usb.h | 24 | ||||
-rw-r--r-- | drivers/staging/comedi/comedidev.h | 29 |
2 files changed, 22 insertions, 31 deletions
diff --git a/drivers/staging/comedi/comedi_usb.h b/drivers/staging/comedi/comedi_usb.h index a57025bf5b81..721128bece3c 100644 --- a/drivers/staging/comedi/comedi_usb.h +++ b/drivers/staging/comedi/comedi_usb.h @@ -23,8 +23,28 @@ #include "comedidev.h" -/* - * TODO: Move USB-specific stuff into here from "comedidev.h". +struct usb_interface *comedi_to_usb_interface(struct comedi_device *); +struct usb_device *comedi_to_usb_dev(struct comedi_device *); + +int comedi_usb_auto_config(struct usb_interface *, struct comedi_driver *, + unsigned long context); +void comedi_usb_auto_unconfig(struct usb_interface *); + +int comedi_usb_driver_register(struct comedi_driver *, struct usb_driver *); +void comedi_usb_driver_unregister(struct comedi_driver *, struct usb_driver *); + +/** + * module_comedi_usb_driver() - Helper macro for registering a comedi USB driver + * @__comedi_driver: comedi_driver struct + * @__usb_driver: usb_driver struct + * + * Helper macro for comedi USB drivers which do not do anything special + * in module init/exit. This eliminates a lot of boilerplate. Each + * module may only use this macro once, and calling it replaces + * module_init() and module_exit() */ +#define module_comedi_usb_driver(__comedi_driver, __usb_driver) \ + module_driver(__comedi_driver, comedi_usb_driver_register, \ + comedi_usb_driver_unregister, &(__usb_driver)) #endif /* _COMEDI_USB_H */ diff --git a/drivers/staging/comedi/comedidev.h b/drivers/staging/comedi/comedidev.h index e5daaeb6b013..bc1dfc175add 100644 --- a/drivers/staging/comedi/comedidev.h +++ b/drivers/staging/comedi/comedidev.h @@ -629,33 +629,4 @@ void comedi_pcmcia_driver_unregister(struct comedi_driver *, module_driver(__comedi_driver, comedi_pcmcia_driver_register, \ comedi_pcmcia_driver_unregister, &(__pcmcia_driver)) -/* comedi_usb.c - comedi USB driver specific functions */ - -struct usb_driver; -struct usb_interface; - -struct usb_interface *comedi_to_usb_interface(struct comedi_device *); -struct usb_device *comedi_to_usb_dev(struct comedi_device *); - -int comedi_usb_auto_config(struct usb_interface *, struct comedi_driver *, - unsigned long context); -void comedi_usb_auto_unconfig(struct usb_interface *); - -int comedi_usb_driver_register(struct comedi_driver *, struct usb_driver *); -void comedi_usb_driver_unregister(struct comedi_driver *, struct usb_driver *); - -/** - * module_comedi_usb_driver() - Helper macro for registering a comedi USB driver - * @__comedi_driver: comedi_driver struct - * @__usb_driver: usb_driver struct - * - * Helper macro for comedi USB drivers which do not do anything special - * in module init/exit. This eliminates a lot of boilerplate. Each - * module may only use this macro once, and calling it replaces - * module_init() and module_exit() - */ -#define module_comedi_usb_driver(__comedi_driver, __usb_driver) \ - module_driver(__comedi_driver, comedi_usb_driver_register, \ - comedi_usb_driver_unregister, &(__usb_driver)) - #endif /* _COMEDIDEV_H */ |