aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base/base.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/base/base.h')
-rw-r--r--drivers/base/base.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/base/base.h b/drivers/base/base.h
index b528145a078f..2ca7f5b7b824 100644
--- a/drivers/base/base.h
+++ b/drivers/base/base.h
@@ -70,6 +70,8 @@ struct class_private {
70 * @knode_parent - node in sibling list 70 * @knode_parent - node in sibling list
71 * @knode_driver - node in driver list 71 * @knode_driver - node in driver list
72 * @knode_bus - node in bus list 72 * @knode_bus - node in bus list
73 * @driver_data - private pointer for driver specific info. Will turn into a
74 * list soon.
73 * @device - pointer back to the struct class that this structure is 75 * @device - pointer back to the struct class that this structure is
74 * associated with. 76 * associated with.
75 * 77 *
@@ -80,6 +82,7 @@ struct device_private {
80 struct klist_node knode_parent; 82 struct klist_node knode_parent;
81 struct klist_node knode_driver; 83 struct klist_node knode_driver;
82 struct klist_node knode_bus; 84 struct klist_node knode_bus;
85 void *driver_data;
83 struct device *device; 86 struct device *device;
84}; 87};
85#define to_device_private_parent(obj) \ 88#define to_device_private_parent(obj) \
@@ -89,6 +92,8 @@ struct device_private {
89#define to_device_private_bus(obj) \ 92#define to_device_private_bus(obj) \
90 container_of(obj, struct device_private, knode_bus) 93 container_of(obj, struct device_private, knode_bus)
91 94
95extern int device_private_init(struct device *dev);
96
92/* initialisation functions */ 97/* initialisation functions */
93extern int devices_init(void); 98extern int devices_init(void);
94extern int buses_init(void); 99extern int buses_init(void);
@@ -104,7 +109,7 @@ extern int system_bus_init(void);
104extern int cpu_dev_init(void); 109extern int cpu_dev_init(void);
105 110
106extern int bus_add_device(struct device *dev); 111extern int bus_add_device(struct device *dev);
107extern void bus_attach_device(struct device *dev); 112extern void bus_probe_device(struct device *dev);
108extern void bus_remove_device(struct device *dev); 113extern void bus_remove_device(struct device *dev);
109 114
110extern int bus_add_driver(struct device_driver *drv); 115extern int bus_add_driver(struct device_driver *drv);
@@ -134,3 +139,9 @@ static inline void module_add_driver(struct module *mod,
134 struct device_driver *drv) { } 139 struct device_driver *drv) { }
135static inline void module_remove_driver(struct device_driver *drv) { } 140static inline void module_remove_driver(struct device_driver *drv) { }
136#endif 141#endif
142
143#ifdef CONFIG_DEVTMPFS
144extern int devtmpfs_init(void);
145#else
146static inline int devtmpfs_init(void) { return 0; }
147#endif