diff options
| author | Paul Gortmaker <paul.gortmaker@windriver.com> | 2011-05-27 09:02:11 -0400 |
|---|---|---|
| committer | Paul Gortmaker <paul.gortmaker@windriver.com> | 2011-10-31 19:32:32 -0400 |
| commit | eb5589a8f0dab7e29021344228856339e6a1249c (patch) | |
| tree | d83790e5ac7feacba5b1832fbe7f8d2a39d76f65 /include/linux/ssb | |
| parent | 7c926402a7e8c9b279968fd94efec8700ba3859e (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/ssb')
| -rw-r--r-- | include/linux/ssb/ssb.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/include/linux/ssb/ssb.h b/include/linux/ssb/ssb.h index f10ed7b4a714..061e560251b4 100644 --- a/include/linux/ssb/ssb.h +++ b/include/linux/ssb/ssb.h | |||
| @@ -231,10 +231,9 @@ struct ssb_driver { | |||
| 231 | #define drv_to_ssb_drv(_drv) container_of(_drv, struct ssb_driver, drv) | 231 | #define drv_to_ssb_drv(_drv) container_of(_drv, struct ssb_driver, drv) |
| 232 | 232 | ||
| 233 | extern int __ssb_driver_register(struct ssb_driver *drv, struct module *owner); | 233 | extern int __ssb_driver_register(struct ssb_driver *drv, struct module *owner); |
| 234 | static inline int ssb_driver_register(struct ssb_driver *drv) | 234 | #define ssb_driver_register(drv) \ |
| 235 | { | 235 | __ssb_driver_register(drv, THIS_MODULE) |
| 236 | return __ssb_driver_register(drv, THIS_MODULE); | 236 | |
| 237 | } | ||
| 238 | extern void ssb_driver_unregister(struct ssb_driver *drv); | 237 | extern void ssb_driver_unregister(struct ssb_driver *drv); |
| 239 | 238 | ||
| 240 | 239 | ||
