LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Ian Abbott <abbotti@mev.co.uk>
To: <driverdev-devel@linuxdriverproject.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Ian Abbott <abbotti@mev.co.uk>,
	H Hartley Sweeten <hartleys@visionengravers.com>,
	<linux-kernel@vger.kernel.org>
Subject: [PATCH 56/56] staging: comedi: comedi_pci.h: move PCI stuff out of comedidev.h
Date: Tue, 10 Mar 2015 16:11:15 +0000	[thread overview]
Message-ID: <1426003875-27653-57-git-send-email-abbotti@mev.co.uk> (raw)
In-Reply-To: <1426003875-27653-1-git-send-email-abbotti@mev.co.uk>

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>
---
 drivers/staging/comedi/comedi_pci.h | 36 ++++++++++++++++++++++++++++++-
 drivers/staging/comedi/comedidev.h  | 43 -------------------------------------
 2 files changed, 35 insertions(+), 44 deletions(-)

diff --git a/drivers/staging/comedi/comedi_pci.h b/drivers/staging/comedi/comedi_pci.h
index a083465..4005cc9 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 */
diff --git a/drivers/staging/comedi/comedidev.h b/drivers/staging/comedi/comedidev.h
index 30595c0..4720dbc 100644
--- a/drivers/staging/comedi/comedidev.h
+++ b/drivers/staging/comedi/comedidev.h
@@ -554,47 +554,4 @@ void comedi_driver_unregister(struct comedi_driver *);
 	module_driver(__comedi_driver, comedi_driver_register, \
 			comedi_driver_unregister)
 
-/* comedi_pci.c - comedi PCI driver specific functions */
-
-/*
- * 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;
-struct pci_driver;
-
-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 /* _COMEDIDEV_H */
-- 
2.1.4


  parent reply	other threads:[~2015-03-10 16:16 UTC|newest]

Thread overview: 64+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-10 16:10 [PATCH 00/56] staging: comedi: introduce comedi_pci.h header Ian Abbott
2015-03-10 16:10 ` [PATCH 01/56] staging: comedi: add comedi_pci.h Ian Abbott
2015-03-10 16:10 ` [PATCH 02/56] staging: comedi: comedi_pci.c: include new "comedi_pci.h" header Ian Abbott
2015-03-10 16:10 ` [PATCH 03/56] staging: comedi: 8255_pci: " Ian Abbott
2015-03-10 16:10 ` [PATCH 04/56] staging: comedi: addi_apci_1032: " Ian Abbott
2015-03-10 16:10 ` [PATCH 05/56] staging: comedi: addi_apci_1500: " Ian Abbott
2015-03-10 16:10 ` [PATCH 06/56] staging: comedi: addi_apci_1516: " Ian Abbott
2015-03-10 16:10 ` [PATCH 07/56] staging: comedi: addi_apci_1564: " Ian Abbott
2015-03-10 16:10 ` [PATCH 08/56] staging: comedi: addi_apci_16xx: " Ian Abbott
2015-03-10 16:10 ` [PATCH 09/56] staging: comedi: addi_apci_2032: " Ian Abbott
2015-03-10 16:10 ` [PATCH 10/56] staging: comedi: addi_apci_2200: " Ian Abbott
2015-03-10 16:10 ` [PATCH 11/56] staging: comedi: addi_apci_3120: " Ian Abbott
2015-03-10 16:10 ` [PATCH 12/56] staging: comedi: addi_apci_3501: " Ian Abbott
2015-03-10 16:10 ` [PATCH 13/56] staging: comedi: addi_apci_3xxx: " Ian Abbott
2015-03-10 16:10 ` [PATCH 14/56] staging: comedi: adl_pci6208: " Ian Abbott
2015-03-10 16:10 ` [PATCH 15/56] staging: comedi: adl_pci7x3x: " Ian Abbott
2015-03-10 16:10 ` [PATCH 16/56] staging: comedi: adl_pci8164: " Ian Abbott
2015-03-10 16:10 ` [PATCH 17/56] staging: comedi: adl_pci9111: " Ian Abbott
2015-03-10 16:10 ` [PATCH 18/56] staging: comedi: adl_pci9118: " Ian Abbott
2015-03-10 16:10 ` [PATCH 19/56] staging: comedi: adv_pci1710: " Ian Abbott
2015-03-10 16:10 ` [PATCH 20/56] staging: comedi: adv_pci1723: " Ian Abbott
2015-03-10 16:10 ` [PATCH 21/56] staging: comedi: adv_pci1724: " Ian Abbott
2015-03-10 16:10 ` [PATCH 22/56] staging: comedi: adv_pci_dio: " Ian Abbott
2015-03-10 16:10 ` [PATCH 23/56] staging: comedi: amplc_dio200_pci: " Ian Abbott
2015-03-10 16:10 ` [PATCH 24/56] staging: comedi: amplc_pci224: " Ian Abbott
2015-03-10 16:10 ` [PATCH 25/56] staging: comedi: amplc_pci230: " Ian Abbott
2015-03-10 16:10 ` [PATCH 26/56] staging: comedi: amplc_pci236: " Ian Abbott
2015-03-10 16:10 ` [PATCH 27/56] staging: comedi: amplc_pci263: " Ian Abbott
2015-03-10 16:10 ` [PATCH 28/56] staging: comedi: cb_pcidas64: " Ian Abbott
2015-03-10 16:10 ` [PATCH 29/56] staging: comedi: cb_pcidas: " Ian Abbott
2015-03-10 16:10 ` [PATCH 30/56] staging: comedi: cb_pcidda: " Ian Abbott
2015-03-10 16:10 ` [PATCH 31/56] staging: comedi: cb_pcimdas: " Ian Abbott
2015-03-10 16:10 ` [PATCH 32/56] staging: comedi: cb_pcimdda: " Ian Abbott
2015-03-10 16:10 ` [PATCH 33/56] staging: comedi: contec_pci_dio: " Ian Abbott
2015-03-10 16:10 ` [PATCH 34/56] staging: comedi: daqboard2000: " Ian Abbott
2015-03-10 16:10 ` [PATCH 35/56] staging: comedi: das08_pci: " Ian Abbott
2015-03-10 16:10 ` [PATCH 36/56] staging: comedi: dt3000: " Ian Abbott
2015-03-10 16:10 ` [PATCH 37/56] staging: comedi: dyna_pci10xx: " Ian Abbott
2015-03-10 16:10 ` [PATCH 38/56] staging: comedi: gsc_hpdi: " Ian Abbott
2015-03-10 16:10 ` [PATCH 39/56] staging: comedi: icp_multi: " Ian Abbott
2015-03-10 16:10 ` [PATCH 40/56] staging: comedi: jr3_pci: " Ian Abbott
2015-03-10 16:11 ` [PATCH 41/56] staging: comedi: ke_counter: " Ian Abbott
2015-03-10 16:11 ` [PATCH 42/56] staging: comedi: me4000: " Ian Abbott
2015-03-10 16:11 ` [PATCH 43/56] staging: comedi: me_daq: " Ian Abbott
2015-03-10 16:11 ` [PATCH 44/56] staging: comedi: mf6x4: " Ian Abbott
2015-03-10 16:11 ` [PATCH 45/56] staging: comedi: mite.c: " Ian Abbott
2015-03-10 16:11 ` [PATCH 46/56] staging: comedi: mite.h: " Ian Abbott
2015-03-10 16:11 ` [PATCH 47/56] staging: comedi: ni_6527: " Ian Abbott
2015-03-10 16:11 ` [PATCH 48/56] staging: comedi: ni_65xx: " Ian Abbott
2015-03-10 16:11 ` [PATCH 49/56] staging: comedi: ni_660x: " Ian Abbott
2015-03-10 16:11 ` [PATCH 50/56] staging: comedi: ni_670x: " Ian Abbott
2015-03-10 16:11 ` [PATCH 51/56] staging: comedi: ni_labpc_pci: " Ian Abbott
2015-03-10 16:11 ` [PATCH 52/56] staging: comedi: ni_pcmdio: " Ian Abbott
2015-03-10 16:11 ` [PATCH 53/56] staging: comedi: ni_pcmmio: " Ian Abbott
2015-03-10 16:11 ` [PATCH 54/56] staging: comedi: rtd520: " Ian Abbott
2015-03-10 16:11 ` [PATCH 55/56] staging: comedi: s626: " Ian Abbott
2015-03-10 16:11 ` Ian Abbott [this message]
2015-03-10 16:25 ` [PATCH 00/56] staging: comedi: introduce comedi_pci.h header Joe Perches
2015-03-10 18:26   ` Hartley Sweeten
2015-03-10 18:35     ` Joe Perches
2015-03-10 18:38       ` Greg Kroah-Hartman
2015-03-12 10:29   ` Ian Abbott
2015-03-13 10:28     ` Ian Abbott
2015-03-10 20:34 ` Hartley Sweeten

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1426003875-27653-57-git-send-email-abbotti@mev.co.uk \
    --to=abbotti@mev.co.uk \
    --cc=driverdev-devel@linuxdriverproject.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hartleys@visionengravers.com \
    --cc=linux-kernel@vger.kernel.org \
    --subject='Re: [PATCH 56/56] staging: comedi: comedi_pci.h: move PCI stuff out of comedidev.h' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).