]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/linux/device.h
Merge branch 'linus' into genirq
[linux-2.6-omap-h63xx.git] / include / linux / device.h
index 4d8372d135df8df6d4f648b009faaa5d4d315538..246937c9cbc780db2cc30b542453d401bcd6c334 100644 (file)
@@ -199,6 +199,11 @@ struct class {
        struct class_private *p;
 };
 
+struct class_dev_iter {
+       struct klist_iter               ki;
+       const struct device_type        *type;
+};
+
 extern struct kobject *sysfs_dev_block_kobj;
 extern struct kobject *sysfs_dev_char_kobj;
 extern int __must_check __class_register(struct class *class,
@@ -213,6 +218,13 @@ extern void class_unregister(struct class *class);
        __class_register(class, &__key);        \
 })
 
+extern void class_dev_iter_init(struct class_dev_iter *iter,
+                               struct class *class,
+                               struct device *start,
+                               const struct device_type *type);
+extern struct device *class_dev_iter_next(struct class_dev_iter *iter);
+extern void class_dev_iter_exit(struct class_dev_iter *iter);
+
 extern int class_for_each_device(struct class *class, struct device *start,
                                 void *data,
                                 int (*fn)(struct device *dev, void *data));
@@ -396,7 +408,7 @@ struct device {
        spinlock_t              devres_lock;
        struct list_head        devres_head;
 
-       struct list_head        node;
+       struct klist_node       knode_class;
        struct class            *class;
        dev_t                   devt;   /* dev_t, creates the sysfs "dev" */
        struct attribute_group  **groups;       /* optional groups */