}
+/**
+ * sysfs_add_file_to_group - add an attribute file to a pre-existing group.
+ * @kobj: object we're acting for.
+ * @attr: attribute descriptor.
+ * @group: group name.
+ */
+int sysfs_add_file_to_group(struct kobject *kobj,
+ const struct attribute *attr, const char *group)
+{
+ struct dentry *dir;
+ int error;
+
+ dir = lookup_one_len(group, kobj->dentry, strlen(group));
+ if (IS_ERR(dir))
+ error = PTR_ERR(dir);
+ else {
+ error = sysfs_add_file(dir, attr, SYSFS_KOBJ_ATTR);
+ dput(dir);
+ }
+ return error;
+}
+EXPORT_SYMBOL_GPL(sysfs_add_file_to_group);
+
+
/**
* sysfs_update_file - update the modified timestamp on an object attribute.
* @kobj: object we're acting for.
}
+/**
+ * sysfs_remove_file_from_group - remove an attribute file from a group.
+ * @kobj: object we're acting for.
+ * @attr: attribute descriptor.
+ * @group: group name.
+ */
+void sysfs_remove_file_from_group(struct kobject *kobj,
+ const struct attribute *attr, const char *group)
+{
+ struct dentry *dir;
+
+ dir = lookup_one_len(group, kobj->dentry, strlen(group));
+ if (!IS_ERR(dir)) {
+ sysfs_hash_and_remove(dir, attr->name);
+ dput(dir);
+ }
+}
+EXPORT_SYMBOL_GPL(sysfs_remove_file_from_group);
+
+
EXPORT_SYMBOL_GPL(sysfs_create_file);
EXPORT_SYMBOL_GPL(sysfs_remove_file);
EXPORT_SYMBOL_GPL(sysfs_update_file);
int __must_check sysfs_create_group(struct kobject *,
const struct attribute_group *);
void sysfs_remove_group(struct kobject *, const struct attribute_group *);
+int sysfs_add_file_to_group(struct kobject *kobj,
+ const struct attribute *attr, const char *group);
+void sysfs_remove_file_from_group(struct kobject *kobj,
+ const struct attribute *attr, const char *group);
+
void sysfs_notify(struct kobject * k, char *dir, char *attr);
;
}
+static inline int sysfs_add_file_to_group(struct kobject *kobj,
+ const struct attribute *attr, const char *group)
+{
+ return 0;
+}
+
+static inline void sysfs_remove_file_from_group(struct kobject *kobj,
+ const struct attribute *attr, const char *group);
+{
+ ;
+}
+
static inline void sysfs_notify(struct kobject * k, char *dir, char *attr)
{
}