All of 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 9/9] staging: comedi: comedi_usb.h: move USB stuff out of comedidev.h
Date: Tue, 27 Jan 2015 17:49:09 +0000	[thread overview]
Message-ID: <1422380949-5994-10-git-send-email-abbotti@mev.co.uk> (raw)
In-Reply-To: <1422380949-5994-1-git-send-email-abbotti@mev.co.uk>

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>
---
 drivers/staging/comedi/comedi_usb.h | 24 ++++++++++++++++++++++--
 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 a57025b..721128b 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 e5daaeb..bc1dfc1 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 */
-- 
2.1.4


WARNING: multiple messages have this Message-ID (diff)
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>,
	linux-kernel@vger.kernel.org
Subject: [PATCH 9/9] staging: comedi: comedi_usb.h: move USB stuff out of comedidev.h
Date: Tue, 27 Jan 2015 17:49:09 +0000	[thread overview]
Message-ID: <1422380949-5994-10-git-send-email-abbotti@mev.co.uk> (raw)
In-Reply-To: <1422380949-5994-1-git-send-email-abbotti@mev.co.uk>

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>
---
 drivers/staging/comedi/comedi_usb.h | 24 ++++++++++++++++++++++--
 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 a57025b..721128b 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 e5daaeb..bc1dfc1 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 */
-- 
2.1.4

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

  parent reply	other threads:[~2015-01-27 17:50 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-27 17:49 [PATCH 0/9] staging: comedi: introduce comedi_usb.h header Ian Abbott
2015-01-27 17:49 ` Ian Abbott
2015-01-27 17:49 ` [PATCH 1/9] staging: comedi: add comedi_usb.h Ian Abbott
2015-01-27 17:49   ` Ian Abbott
2015-01-27 17:49 ` [PATCH 2/9] staging: comedi: comedi_usb.c: include new "comedi_usb.h" header Ian Abbott
2015-01-27 17:49   ` Ian Abbott
2015-01-27 17:49 ` [PATCH 3/9] staging: comedi: dt9812: " Ian Abbott
2015-01-27 17:49   ` Ian Abbott
2015-01-27 17:49 ` [PATCH 4/9] staging: comedi: ni_usb6501: " Ian Abbott
2015-01-27 17:49   ` Ian Abbott
2015-01-27 17:49 ` [PATCH 5/9] staging: comedi: usbdux: " Ian Abbott
2015-01-27 17:49   ` Ian Abbott
2015-01-27 17:49 ` [PATCH 6/9] staging: comedi: usbduxfast: " Ian Abbott
2015-01-27 17:49   ` Ian Abbott
2015-01-27 17:49 ` [PATCH 7/9] staging: comedi: usbduxsigma: " Ian Abbott
2015-01-27 17:49   ` Ian Abbott
2015-01-27 17:49 ` [PATCH 8/9] staging: comedi: vmk80xx: " Ian Abbott
2015-01-27 17:49   ` Ian Abbott
2015-01-27 17:49 ` Ian Abbott [this message]
2015-01-27 17:49   ` [PATCH 9/9] staging: comedi: comedi_usb.h: move USB stuff out of comedidev.h Ian Abbott
2015-01-27 18:34 ` [PATCH 0/9] staging: comedi: introduce comedi_usb.h header Hartley Sweeten
2015-01-27 18: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=1422380949-5994-10-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 \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.