aboutsummaryrefslogtreecommitdiff
path: root/include/linux/uio_driver.h
diff options
context:
space:
mode:
authorPaul Gortmaker <paul.gortmaker@windriver.com>2011-05-27 09:02:11 -0400
committerPaul Gortmaker <paul.gortmaker@windriver.com>2011-10-31 19:32:32 -0400
commiteb5589a8f0dab7e29021344228856339e6a1249c (patch)
treed83790e5ac7feacba5b1832fbe7f8d2a39d76f65 /include/linux/uio_driver.h
parent7c926402a7e8c9b279968fd94efec8700ba3859e (diff)
include: convert various register fcns to macros to avoid include chaining
The original implementations reference THIS_MODULE in an inline. We could include <linux/export.h>, but it is better to avoid chaining. Fortunately someone else already thought of this, and made a similar inline into a #define in <linux/device.h> for device_schedule_callback(), [see commit 523ded71de0] so follow that precedent here. Also bubble up any __must_check that were used on the prev. wrapper inline functions up one to the real __register functions, to preserve any prev. sanity checks that were used in those instances. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Diffstat (limited to 'include/linux/uio_driver.h')
-rw-r--r--include/linux/uio_driver.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/include/linux/uio_driver.h b/include/linux/uio_driver.h
index fd99ff9298c..73898189a97 100644
--- a/include/linux/uio_driver.h
+++ b/include/linux/uio_driver.h
@@ -101,11 +101,11 @@ extern int __must_check
__uio_register_device(struct module *owner,
struct device *parent,
struct uio_info *info);
-static inline int __must_check
- uio_register_device(struct device *parent, struct uio_info *info)
-{
- return __uio_register_device(THIS_MODULE, parent, info);
-}
+
+/* use a define to avoid include chaining to get THIS_MODULE */
+#define uio_register_device(parent, info) \
+ __uio_register_device(THIS_MODULE, parent, info)
+
extern void uio_unregister_device(struct uio_info *info);
extern void uio_event_notify(struct uio_info *info);