Add hotplug support to mcp251x driver
[safe/jmp/linux-2.6] / include / linux / kobject.h
index c9c214d..3950d3c 100644 (file)
@@ -68,6 +68,7 @@ struct kobject {
        unsigned int state_in_sysfs:1;
        unsigned int state_add_uevent_sent:1;
        unsigned int state_remove_uevent_sent:1;
+       unsigned int uevent_suppress:1;
 };
 
 extern int kobject_set_name(struct kobject *kobj, const char *name, ...)
@@ -105,7 +106,7 @@ extern char *kobject_get_path(struct kobject *kobj, gfp_t flag);
 
 struct kobj_type {
        void (*release)(struct kobject *kobj);
-       struct sysfs_ops *sysfs_ops;
+       const struct sysfs_ops *sysfs_ops;
        struct attribute **default_attrs;
 };
 
@@ -117,9 +118,9 @@ struct kobj_uevent_env {
 };
 
 struct kset_uevent_ops {
-       int (*filter)(struct kset *kset, struct kobject *kobj);
-       const char *(*name)(struct kset *kset, struct kobject *kobj);
-       int (*uevent)(struct kset *kset, struct kobject *kobj,
+       int (* const filter)(struct kset *kset, struct kobject *kobj);
+       const char *(* const name)(struct kset *kset, struct kobject *kobj);
+       int (* const uevent)(struct kset *kset, struct kobject *kobj,
                      struct kobj_uevent_env *env);
 };
 
@@ -131,7 +132,7 @@ struct kobj_attribute {
                         const char *buf, size_t count);
 };
 
-extern struct sysfs_ops kobj_sysfs_ops;
+extern const struct sysfs_ops kobj_sysfs_ops;
 
 /**
  * struct kset - a set of kobjects of a specific type, belonging to a specific subsystem.
@@ -154,14 +155,14 @@ struct kset {
        struct list_head list;
        spinlock_t list_lock;
        struct kobject kobj;
-       struct kset_uevent_ops *uevent_ops;
+       const struct kset_uevent_ops *uevent_ops;
 };
 
 extern void kset_init(struct kset *kset);
 extern int __must_check kset_register(struct kset *kset);
 extern void kset_unregister(struct kset *kset);
 extern struct kset * __must_check kset_create_and_add(const char *name,
-                                               struct kset_uevent_ops *u,
+                                               const struct kset_uevent_ops *u,
                                                struct kobject *parent_kobj);
 
 static inline struct kset *to_kset(struct kobject *kobj)