[S390] zcore: Fix reipl device detection
[safe/jmp/linux-2.6] / drivers / base / base.h
index 8af0bb2..2ca7f5b 100644 (file)
@@ -69,6 +69,9 @@ struct class_private {
  * @klist_children - klist containing all children of this device
  * @knode_parent - node in sibling list
  * @knode_driver - node in driver list
+ * @knode_bus - node in bus list
+ * @driver_data - private pointer for driver specific info.  Will turn into a
+ * list soon.
  * @device - pointer back to the struct class that this structure is
  * associated with.
  *
@@ -78,12 +81,18 @@ struct device_private {
        struct klist klist_children;
        struct klist_node knode_parent;
        struct klist_node knode_driver;
+       struct klist_node knode_bus;
+       void *driver_data;
        struct device *device;
 };
 #define to_device_private_parent(obj)  \
        container_of(obj, struct device_private, knode_parent)
 #define to_device_private_driver(obj)  \
        container_of(obj, struct device_private, knode_driver)
+#define to_device_private_bus(obj)     \
+       container_of(obj, struct device_private, knode_bus)
+
+extern int device_private_init(struct device *dev);
 
 /* initialisation functions */
 extern int devices_init(void);
@@ -100,7 +109,7 @@ extern int system_bus_init(void);
 extern int cpu_dev_init(void);
 
 extern int bus_add_device(struct device *dev);
-extern void bus_attach_device(struct device *dev);
+extern void bus_probe_device(struct device *dev);
 extern void bus_remove_device(struct device *dev);
 
 extern int bus_add_driver(struct device_driver *drv);
@@ -108,10 +117,13 @@ extern void bus_remove_driver(struct device_driver *drv);
 
 extern void driver_detach(struct device_driver *drv);
 extern int driver_probe_device(struct device_driver *drv, struct device *dev);
+static inline int driver_match_device(struct device_driver *drv,
+                                     struct device *dev)
+{
+       return drv->bus->match ? drv->bus->match(dev, drv) : 1;
+}
 
 extern void sysdev_shutdown(void);
-extern int sysdev_suspend(pm_message_t state);
-extern int sysdev_resume(void);
 
 extern char *make_class_name(const char *name, struct kobject *kobj);
 
@@ -127,3 +139,9 @@ static inline void module_add_driver(struct module *mod,
                                     struct device_driver *drv) { }
 static inline void module_remove_driver(struct device_driver *drv) { }
 #endif
+
+#ifdef CONFIG_DEVTMPFS
+extern int devtmpfs_init(void);
+#else
+static inline int devtmpfs_init(void) { return 0; }
+#endif