mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-27 17:11:46 +00:00
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 523ded71de
] 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>
This commit is contained in:
parent
7c926402a7
commit
eb5589a8f0
11 changed files with 57 additions and 58 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue