diff options
author | Ian Abbott <abbotti@mev.co.uk> | 2015-03-10 16:11:15 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-03-20 14:08:18 +0100 |
commit | 4e9adfbcaae9b5245517143c900f8873715a6059 (patch) | |
tree | 953a2692e7231a433a3f6ee36bfb4a930358009b /drivers/staging/comedi/comedi_pci.h | |
parent | 6ab38b050fa69092aa1de0106800571ae2b753fa (diff) | |
download | linux-4e9adfbcaae9b5245517143c900f8873715a6059.tar.gz linux-4e9adfbcaae9b5245517143c900f8873715a6059.tar.bz2 linux-4e9adfbcaae9b5245517143c900f8873715a6059.zip |
staging: comedi: comedi_pci.h: move PCI stuff out of comedidev.h
Move the PCI-specific stuff out of "comedidev.h" into "comedi_pci.h".
Comedi PCI drivers now include "comedi_pci.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/comedi_pci.h')
-rw-r--r-- | drivers/staging/comedi/comedi_pci.h | 36 |
1 files changed, 35 insertions, 1 deletions
diff --git a/drivers/staging/comedi/comedi_pci.h b/drivers/staging/comedi/comedi_pci.h index a0834651dee0..4005cc9cf7f1 100644 --- a/drivers/staging/comedi/comedi_pci.h +++ b/drivers/staging/comedi/comedi_pci.h @@ -24,7 +24,41 @@ #include "comedidev.h" /* - * TODO: Move PCI-specific stuff into here from "comedidev.h". + * PCI Vendor IDs not in <linux/pci_ids.h> */ +#define PCI_VENDOR_ID_KOLTER 0x1001 +#define PCI_VENDOR_ID_ICP 0x104c +#define PCI_VENDOR_ID_DT 0x1116 +#define PCI_VENDOR_ID_IOTECH 0x1616 +#define PCI_VENDOR_ID_CONTEC 0x1221 +#define PCI_VENDOR_ID_RTD 0x1435 +#define PCI_VENDOR_ID_HUMUSOFT 0x186c + +struct pci_dev *comedi_to_pci_dev(struct comedi_device *); + +int comedi_pci_enable(struct comedi_device *); +void comedi_pci_disable(struct comedi_device *); +void comedi_pci_detach(struct comedi_device *); + +int comedi_pci_auto_config(struct pci_dev *, struct comedi_driver *, + unsigned long context); +void comedi_pci_auto_unconfig(struct pci_dev *); + +int comedi_pci_driver_register(struct comedi_driver *, struct pci_driver *); +void comedi_pci_driver_unregister(struct comedi_driver *, struct pci_driver *); + +/** + * module_comedi_pci_driver() - Helper macro for registering a comedi PCI driver + * @__comedi_driver: comedi_driver struct + * @__pci_driver: pci_driver struct + * + * Helper macro for comedi PCI 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_pci_driver(__comedi_driver, __pci_driver) \ + module_driver(__comedi_driver, comedi_pci_driver_register, \ + comedi_pci_driver_unregister, &(__pci_driver)) #endif /* _COMEDI_PCI_H */ |