diff options
Diffstat (limited to 'include/linux/device.h')
| -rw-r--r-- | include/linux/device.h | 15 |
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; | |||
| 29 | struct device_private; | 29 | struct device_private; |
| 30 | struct device_driver; | 30 | struct device_driver; |
| 31 | struct driver_private; | 31 | struct driver_private; |
| 32 | struct module; | ||
| 32 | struct class; | 33 | struct class; |
| 33 | struct subsys_private; | 34 | struct subsys_private; |
| 34 | struct bus_type; | 35 | struct bus_type; |
| @@ -723,10 +724,14 @@ extern int dev_set_drvdata(struct device *dev, void *data); | |||
| 723 | */ | 724 | */ |
| 724 | extern struct device *__root_device_register(const char *name, | 725 | extern struct device *__root_device_register(const char *name, |
| 725 | struct module *owner); | 726 | struct module *owner); |
| 726 | static 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 | |||
| 730 | extern void root_device_unregister(struct device *root); | 735 | extern void root_device_unregister(struct device *root); |
| 731 | 736 | ||
| 732 | static inline void *dev_get_platdata(const struct device *dev) | 737 | static inline void *dev_get_platdata(const struct device *dev) |
