sysfs: add sysfs_dirent->s_name
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / fs / sysfs / file.c
index fd4b6dc03d2d7d6630e451c3aaf69c005db9dd46..8240b1687dd08139b855c407a78cf19a78742214 100644 (file)
@@ -454,7 +454,7 @@ int sysfs_add_file(struct dentry * dir, const struct attribute * attr, int type)
                goto out_unlock;
        }
 
-       sd = sysfs_new_dirent((void *)attr, mode, type);
+       sd = sysfs_new_dirent(attr->name, (void *)attr, mode, type);
        if (!sd) {
                error = -ENOMEM;
                goto out_unlock;