diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-16 11:27:10 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-16 11:27:10 -0400 |
commit | ab86e5765d41a5eb4239a1c04d613db87bea5ed8 (patch) | |
tree | a41224d4874c2f90e0b423786f00bedf6f3e8bfa /drivers/base/base.h | |
parent | 7ea61767e41e2baedd6a968d13f56026522e1207 (diff) | |
parent | 2b2af54a5bb6f7e80ccf78f20084b93c398c3a8b (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6:
Driver Core: devtmpfs - kernel-maintained tmpfs-based /dev
debugfs: Modify default debugfs directory for debugging pktcdvd.
debugfs: Modified default dir of debugfs for debugging UHCI.
debugfs: Change debugfs directory of IWMC3200
debugfs: Change debuhgfs directory of trace-events-sample.h
debugfs: Fix mount directory of debugfs by default in events.txt
hpilo: add poll f_op
hpilo: add interrupt handler
hpilo: staging for interrupt handling
driver core: platform_device_add_data(): use kmemdup()
Driver core: Add support for compatibility classes
uio: add generic driver for PCI 2.3 devices
driver-core: move dma-coherent.c from kernel to driver/base
mem_class: fix bug
mem_class: use minor as index instead of searching the array
driver model: constify attribute groups
UIO: remove 'default n' from Kconfig
Driver core: Add accessor for device platform data
Driver core: move dev_get/set_drvdata to drivers/base/dd.c
Driver core: add new device to bus's list before probing
Diffstat (limited to 'drivers/base/base.h')
-rw-r--r-- | drivers/base/base.h | 13 |
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 | ||
95 | extern int device_private_init(struct device *dev); | ||
96 | |||
92 | /* initialisation functions */ | 97 | /* initialisation functions */ |
93 | extern int devices_init(void); | 98 | extern int devices_init(void); |
94 | extern int buses_init(void); | 99 | extern int buses_init(void); |
@@ -104,7 +109,7 @@ extern int system_bus_init(void); | |||
104 | extern int cpu_dev_init(void); | 109 | extern int cpu_dev_init(void); |
105 | 110 | ||
106 | extern int bus_add_device(struct device *dev); | 111 | extern int bus_add_device(struct device *dev); |
107 | extern void bus_attach_device(struct device *dev); | 112 | extern void bus_probe_device(struct device *dev); |
108 | extern void bus_remove_device(struct device *dev); | 113 | extern void bus_remove_device(struct device *dev); |
109 | 114 | ||
110 | extern int bus_add_driver(struct device_driver *drv); | 115 | extern 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) { } |
135 | static inline void module_remove_driver(struct device_driver *drv) { } | 140 | static inline void module_remove_driver(struct device_driver *drv) { } |
136 | #endif | 141 | #endif |
142 | |||
143 | #ifdef CONFIG_DEVTMPFS | ||
144 | extern int devtmpfs_init(void); | ||
145 | #else | ||
146 | static inline int devtmpfs_init(void) { return 0; } | ||
147 | #endif | ||