Skip to content

Commit c05fc27

Browse files
Al Virogregkh
authored andcommitted
greybus/camera - stop messing with ->d_iname
Signed-off-by: Al Viro <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent e12a76f commit c05fc27

File tree

1 file changed

+3
-14
lines changed

1 file changed

+3
-14
lines changed

drivers/staging/greybus/camera.c

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1128,18 +1128,7 @@ static ssize_t gb_camera_debugfs_write(struct file *file,
11281128

11291129
static int gb_camera_debugfs_open(struct inode *inode, struct file *file)
11301130
{
1131-
unsigned int i;
1132-
1133-
for (i = 0; i < ARRAY_SIZE(gb_camera_debugfs_entries); ++i) {
1134-
const struct gb_camera_debugfs_entry *entry =
1135-
&gb_camera_debugfs_entries[i];
1136-
1137-
if (!strcmp(file->f_path.dentry->d_iname, entry->name)) {
1138-
file->private_data = (void *)entry;
1139-
break;
1140-
}
1141-
}
1142-
1131+
file->private_data = (void *)debugfs_get_aux(file);
11431132
return 0;
11441133
}
11451134

@@ -1175,8 +1164,8 @@ static int gb_camera_debugfs_init(struct gb_camera *gcam)
11751164

11761165
gcam->debugfs.buffers[i].length = 0;
11771166

1178-
debugfs_create_file(entry->name, entry->mask,
1179-
gcam->debugfs.root, gcam,
1167+
debugfs_create_file_aux(entry->name, entry->mask,
1168+
gcam->debugfs.root, gcam, entry,
11801169
&gb_camera_debugfs_ops);
11811170
}
11821171

0 commit comments

Comments
 (0)