aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/device.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/device.h')
-rw-r--r--include/linux/device.h15
1 files changed, 10 insertions, 5 deletions
diff --git a/include/linux/device.h b/include/linux/device.h
index e88abeecfadf..ffbcf95cd97d 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -20,7 +20,7 @@
20#include <linux/lockdep.h> 20#include <linux/lockdep.h>
21#include <linux/compiler.h> 21#include <linux/compiler.h>
22#include <linux/types.h> 22#include <linux/types.h>
23#include <linux/module.h> 23#include <linux/mutex.h>
24#include <linux/pm.h> 24#include <linux/pm.h>
25#include <linux/atomic.h> 25#include <linux/atomic.h>
26#include <asm/device.h> 26#include <asm/device.h>
@@ -29,6 +29,7 @@ struct device;
29struct device_private; 29struct device_private;
30struct device_driver; 30struct device_driver;
31struct driver_private; 31struct driver_private;
32struct module;
32struct class; 33struct class;
33struct subsys_private; 34struct subsys_private;
34struct bus_type; 35struct bus_type;
@@ -723,10 +724,14 @@ extern int dev_set_drvdata(struct device *dev, void *data);
723 */ 724 */
724extern struct device *__root_device_register(const char *name, 725extern struct device *__root_device_register(const char *name,
725 struct module *owner); 726 struct module *owner);
726static inline struct device *root_device_register(const char *name) 727
727{ 728/*
728 return __root_device_register(name, THIS_MODULE); 729 * This is a macro to avoid include problems with THIS_MODULE,
729} 730 * just as per what is done for device_schedule_callback() above.
731 */
732#define root_device_register(name) \
733 __root_device_register(name, THIS_MODULE)
734
730extern void root_device_unregister(struct device *root); 735extern void root_device_unregister(struct device *root);
731 736
732static inline void *dev_get_platdata(const struct device *dev) 737static inline void *dev_get_platdata(const struct device *dev)