Kobject: remove kobject_add() as no one uses it anymore
[safe/jmp/linux-2.6] / include / linux / kobject.h
index bd741e8..8b0aa71 100644 (file)
@@ -80,7 +80,6 @@ static inline const char * kobject_name(const struct kobject * kobj)
 
 extern void kobject_init(struct kobject *);
 extern void kobject_init_ng(struct kobject *kobj, struct kobj_type *ktype);
-extern int __must_check kobject_add(struct kobject *);
 extern int __must_check kobject_add_ng(struct kobject *kobj,
                                       struct kobject *parent,
                                       const char *fmt, ...);
@@ -126,6 +125,16 @@ struct kset_uevent_ops {
                      struct kobj_uevent_env *env);
 };
 
+struct kobj_attribute {
+       struct attribute attr;
+       ssize_t (*show)(struct kobject *kobj, struct kobj_attribute *attr,
+                       char *buf);
+       ssize_t (*store)(struct kobject *kobj, struct kobj_attribute *attr,
+                        const char *buf, size_t count);
+};
+
+extern struct sysfs_ops kobj_sysfs_ops;
+
 /**
  * struct kset - a set of kobjects of a specific type, belonging to a specific subsystem.
  *
@@ -188,28 +197,14 @@ extern struct kobject * kset_find_obj(struct kset *, const char *);
 #define set_kset_name(str)     .kset = { .kobj = { .k_name = str } }
 
 
-#define decl_subsys(_name,_uevent_ops) \
-struct kset _name##_subsys = { \
-       .kobj = { .k_name = __stringify(_name) }, \
-       .uevent_ops =_uevent_ops, \
-}
-
-/* The global /sys/kernel/ kset for people to chain off of */
-extern struct kset *kernel_kset;
-/* The global /sys/hypervisor/ subsystem  */
-extern struct kset hypervisor_subsys;
-
-extern int __must_check subsystem_register(struct kset *);
-extern void subsystem_unregister(struct kset *);
-
-struct subsys_attribute {
-       struct attribute attr;
-       ssize_t (*show)(struct kset *, char *);
-       ssize_t (*store)(struct kset *, const char *, size_t);
-};
-
-extern int __must_check subsys_create_file(struct kset *,
-                                       struct subsys_attribute *);
+/* The global /sys/kernel/ kobject for people to chain off of */
+extern struct kobject *kernel_kobj;
+/* The global /sys/hypervisor/ kobject for people to chain off of */
+extern struct kobject *hypervisor_kobj;
+/* The global /sys/power/ kobject for people to chain off of */
+extern struct kobject *power_kobj;
+/* The global /sys/firmware/ kobject for people to chain off of */
+extern struct kobject *firmware_kobj;
 
 #if defined(CONFIG_HOTPLUG)
 int kobject_uevent(struct kobject *kobj, enum kobject_action action);