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:
Paul Gortmaker 2011-05-27 09:02:11 -04:00
parent 7c926402a7
commit eb5589a8f0
11 changed files with 57 additions and 58 deletions

View file

@ -111,10 +111,9 @@ int __must_check __umc_driver_register(struct umc_driver *umc_drv,
* umc_driver_register - register a UMC capabiltity driver.
* @umc_drv: pointer to the driver.
*/
static inline int __must_check umc_driver_register(struct umc_driver *umc_drv)
{
return __umc_driver_register(umc_drv, THIS_MODULE, KBUILD_MODNAME);
}
#define umc_driver_register(umc_drv) \
__umc_driver_register(umc_drv, THIS_MODULE, KBUILD_MODNAME)
void umc_driver_unregister(struct umc_driver *umc_drv);
/*