mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-22 14:41:27 +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
|
@ -170,10 +170,9 @@ struct bcma_driver {
|
|||
};
|
||||
extern
|
||||
int __bcma_driver_register(struct bcma_driver *drv, struct module *owner);
|
||||
static inline int bcma_driver_register(struct bcma_driver *drv)
|
||||
{
|
||||
return __bcma_driver_register(drv, THIS_MODULE);
|
||||
}
|
||||
#define bcma_driver_register(drv) \
|
||||
__bcma_driver_register(drv, THIS_MODULE)
|
||||
|
||||
extern void bcma_driver_unregister(struct bcma_driver *drv);
|
||||
|
||||
struct bcma_bus {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue