diff options
Diffstat (limited to 'include/linux/device.h')
-rw-r--r-- | include/linux/device.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/include/linux/device.h b/include/linux/device.h index 85e78fc7d7f..61f29f6a403 100644 --- a/include/linux/device.h +++ b/include/linux/device.h @@ -723,10 +723,14 @@ extern int dev_set_drvdata(struct device *dev, void *data); */ extern struct device *__root_device_register(const char *name, struct module *owner); -static inline struct device *root_device_register(const char *name) -{ - return __root_device_register(name, THIS_MODULE); -} + +/* + * This is a macro to avoid include problems with THIS_MODULE, + * just as per what is done for device_schedule_callback() above. + */ +#define root_device_register(name) \ + __root_device_register(name, THIS_MODULE) + extern void root_device_unregister(struct device *root); static inline void *dev_get_platdata(const struct device *dev) |