mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-25 16:11:45 +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
|
@ -231,10 +231,9 @@ struct ssb_driver {
|
|||
#define drv_to_ssb_drv(_drv) container_of(_drv, struct ssb_driver, drv)
|
||||
|
||||
extern int __ssb_driver_register(struct ssb_driver *drv, struct module *owner);
|
||||
static inline int ssb_driver_register(struct ssb_driver *drv)
|
||||
{
|
||||
return __ssb_driver_register(drv, THIS_MODULE);
|
||||
}
|
||||
#define ssb_driver_register(drv) \
|
||||
__ssb_driver_register(drv, THIS_MODULE)
|
||||
|
||||
extern void ssb_driver_unregister(struct ssb_driver *drv);
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue