/* 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)
/* 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 sysfs_dirent *dir_sd;
	int error;
	if (group)
		dir_sd = sysfs_get_dirent(kobj->sd, group);
	else
		dir_sd = sysfs_get(kobj->sd);
	if (!dir_sd)
		return -ENOENT;
	error = sysfs_add_file(dir_sd, attr, SYSFS_KOBJ_ATTR);
	sysfs_put(dir_sd);
	return error;
}