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 10/10] staging: comedi: comedi_pcmcia.h: move PCMCIA stuff out of comedidev.h
Date: Fri, 30 Jan 2015 09:57:26 +0000	[thread overview]
Message-ID: <1422611846-15921-11-git-send-email-abbotti@mev.co.uk> (raw)
In-Reply-To: <1422611846-15921-1-git-send-email-abbotti@mev.co.uk>

Move the PCMCIA-specific stuff out of "comedidev.h" into
"comedi_pcmcia.h".  Comedi PCMCIA drivers now include "comedi_pcmcia.h"
instead of "comedidev.h", which now gets pulled in indirectly.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
---
 drivers/staging/comedi/comedi_pcmcia.h | 28 ++++++++++++++++++++++++++--
 drivers/staging/comedi/comedidev.h     | 33 ---------------------------------
 2 files changed, 26 insertions(+), 35 deletions(-)

diff --git a/drivers/staging/comedi/comedi_pcmcia.h b/drivers/staging/comedi/comedi_pcmcia.h
index ba073af..5d3db2b 100644
--- a/drivers/staging/comedi/comedi_pcmcia.h
+++ b/drivers/staging/comedi/comedi_pcmcia.h
@@ -24,8 +24,32 @@
 
 #include "comedidev.h"
 
-/*
- * TODO: Move PCMCIA-specific stuff into here from "comedidev.h".
+struct pcmcia_device *comedi_to_pcmcia_dev(struct comedi_device *);
+
+int comedi_pcmcia_enable(struct comedi_device *,
+			 int (*conf_check)(struct pcmcia_device *, void *));
+void comedi_pcmcia_disable(struct comedi_device *);
+
+int comedi_pcmcia_auto_config(struct pcmcia_device *, struct comedi_driver *);
+void comedi_pcmcia_auto_unconfig(struct pcmcia_device *);
+
+int comedi_pcmcia_driver_register(struct comedi_driver *,
+				  struct pcmcia_driver *);
+void comedi_pcmcia_driver_unregister(struct comedi_driver *,
+				     struct pcmcia_driver *);
+
+/**
+ * module_comedi_pcmcia_driver() - Helper macro for registering a comedi PCMCIA driver
+ * @__comedi_driver: comedi_driver struct
+ * @__pcmcia_driver: pcmcia_driver struct
+ *
+ * Helper macro for comedi PCMCIA 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_pcmcia_driver(__comedi_driver, __pcmcia_driver) \
+	module_driver(__comedi_driver, comedi_pcmcia_driver_register, \
+			comedi_pcmcia_driver_unregister, &(__pcmcia_driver))
 
 #endif /* _COMEDI_PCMCIA_H */
diff --git a/drivers/staging/comedi/comedidev.h b/drivers/staging/comedi/comedidev.h
index bc1dfc1..e138eb0 100644
--- a/drivers/staging/comedi/comedidev.h
+++ b/drivers/staging/comedi/comedidev.h
@@ -596,37 +596,4 @@ void comedi_pci_driver_unregister(struct comedi_driver *, struct pci_driver *);
 	module_driver(__comedi_driver, comedi_pci_driver_register, \
 			comedi_pci_driver_unregister, &(__pci_driver))
 
-/* comedi_pcmcia.c - comedi PCMCIA driver specific functions */
-
-struct pcmcia_driver;
-struct pcmcia_device;
-
-struct pcmcia_device *comedi_to_pcmcia_dev(struct comedi_device *);
-
-int comedi_pcmcia_enable(struct comedi_device *,
-			 int (*conf_check)(struct pcmcia_device *, void *));
-void comedi_pcmcia_disable(struct comedi_device *);
-
-int comedi_pcmcia_auto_config(struct pcmcia_device *, struct comedi_driver *);
-void comedi_pcmcia_auto_unconfig(struct pcmcia_device *);
-
-int comedi_pcmcia_driver_register(struct comedi_driver *,
-				  struct pcmcia_driver *);
-void comedi_pcmcia_driver_unregister(struct comedi_driver *,
-				     struct pcmcia_driver *);
-
-/**
- * module_comedi_pcmcia_driver() - Helper macro for registering a comedi PCMCIA driver
- * @__comedi_driver: comedi_driver struct
- * @__pcmcia_driver: pcmcia_driver struct
- *
- * Helper macro for comedi PCMCIA 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_pcmcia_driver(__comedi_driver, __pcmcia_driver) \
-	module_driver(__comedi_driver, comedi_pcmcia_driver_register, \
-			comedi_pcmcia_driver_unregister, &(__pcmcia_driver))
-
 #endif /* _COMEDIDEV_H */
-- 
2.1.4


  parent reply	other threads:[~2015-01-30  9:59 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-30  9:57 [PATCH 00/10] staging: comedi: introduce comedi_pcmcia.h header Ian Abbott
2015-01-30  9:57 ` [PATCH 01/10] staging: comedi: add comedi_pcmcia.h Ian Abbott
2015-01-30  9:57 ` [PATCH 02/10] staging: comedi: comedi_pcmcia.c: include new "comedi_pcmcia.h" header Ian Abbott
2015-01-30  9:57 ` [PATCH 03/10] staging: comedi: cb_das16_cs: " Ian Abbott
2015-01-30  9:57 ` [PATCH 04/10] staging: comedi: das08_cs: " Ian Abbott
2015-01-30  9:57 ` [PATCH 05/10] staging: comedi: ni_daq_700: " Ian Abbott
2015-01-30  9:57 ` [PATCH 06/10] staging: comedi: ni_daq_dio24: " Ian Abbott
2015-01-30  9:57 ` [PATCH 07/10] staging: comedi: ni_labpc_cs: " Ian Abbott
2015-01-30  9:57 ` [PATCH 08/10] staging: comedi: ni_mio_cs: " Ian Abbott
2015-01-30  9:57 ` [PATCH 09/10] staging: comedi: quatech_daqp_cs: " Ian Abbott
2015-01-30  9:57 ` Ian Abbott [this message]
2015-01-30 17:03 ` [PATCH 00/10] staging: comedi: introduce comedi_pcmcia.h header 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=1422611846-15921-11-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 10/10] staging: comedi: comedi_pcmcia.h: move PCMCIA 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).