]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/linux/device.h
driver core: remove device_create()
[linux-2.6-omap-h63xx.git] / include / linux / device.h
index 14616e80213cb996947ad5f77ec17903fa495f7d..a3ef5a2d4fbb821889b0c3dd8e79a6fb7220b109 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,8 +202,12 @@ 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,
@@ -248,8 +257,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 */
@@ -385,6 +397,9 @@ static inline const char *dev_name(struct device *dev)
        return dev->bus_id;
 }
 
+extern int dev_set_name(struct device *dev, const char *name, ...)
+                       __attribute__((format(printf, 2, 3)));
+
 #ifdef CONFIG_NUMA
 static inline int dev_to_node(struct device *dev)
 {
@@ -455,9 +470,6 @@ extern struct device *device_create_vargs(struct class *cls,
                                          void *drvdata,
                                          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,