]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/linux/device.h
Driver Core: add ability for class_find_device to start in middle of list
[linux-2.6-omap-h63xx.git] / include / linux / device.h
index 6a2d04c011bc1850e4f8191cc3749699952e2b7c..c1f72984875fb7b8f19b3c726abf999a3e5ccb70 100644 (file)
@@ -68,6 +68,8 @@ struct bus_type {
        int (*resume_early)(struct device *dev);
        int (*resume)(struct device *dev);
 
+       struct pm_ext_ops *pm;
+
        struct bus_type_private *p;
 };
 
@@ -131,6 +133,8 @@ struct device_driver {
        int (*resume) (struct device *dev);
        struct attribute_group **groups;
 
+       struct pm_ops *pm;
+
        struct driver_private *p;
 };
 
@@ -189,6 +193,7 @@ struct class {
        struct semaphore        sem; /* locks children, devices, interfaces */
        struct class_attribute          *class_attrs;
        struct device_attribute         *dev_attrs;
+       struct kobject                  *dev_kobj;
 
        int (*dev_uevent)(struct device *dev, struct kobj_uevent_env *env);
 
@@ -197,13 +202,19 @@ struct class {
 
        int (*suspend)(struct device *dev, pm_message_t state);
        int (*resume)(struct device *dev);
+
+       struct pm_ops *pm;
 };
 
+extern struct kobject *sysfs_dev_block_kobj;
+extern struct kobject *sysfs_dev_char_kobj;
 extern int __must_check class_register(struct class *class);
 extern void class_unregister(struct class *class);
-extern int class_for_each_device(struct class *class, void *data,
+extern int class_for_each_device(struct class *class, struct device *start,
+                                void *data,
                                 int (*fn)(struct device *dev, void *data));
-extern struct device *class_find_device(struct class *class, void *data,
+extern struct device *class_find_device(struct class *class,
+                                       struct device *start, void *data,
                                        int (*match)(struct device *, void *));
 
 struct class_attribute {
@@ -248,8 +259,11 @@ struct device_type {
        struct attribute_group **groups;
        int (*uevent)(struct device *dev, struct kobj_uevent_env *env);
        void (*release)(struct device *dev);
+
        int (*suspend)(struct device *dev, pm_message_t state);
        int (*resume)(struct device *dev);
+
+       struct pm_ops *pm;
 };
 
 /* interface for exporting device attributes */
@@ -459,14 +473,10 @@ extern struct device *device_create_vargs(struct class *cls,
                                          const char *fmt,
                                          va_list vargs);
 extern struct device *device_create(struct class *cls, struct device *parent,
-                                   dev_t devt, const char *fmt, ...)
-                                   __attribute__((format(printf, 4, 5)));
-extern struct device *device_create_drvdata(struct class *cls,
-                                           struct device *parent,
-                                           dev_t devt,
-                                           void *drvdata,
-                                           const char *fmt, ...)
+                                   dev_t devt, void *drvdata,
+                                   const char *fmt, ...)
                                    __attribute__((format(printf, 5, 6)));
+#define device_create_drvdata  device_create
 extern void device_destroy(struct class *cls, dev_t devt);
 
 /*