Commit 26717ed3 authored by Bryan O'Donoghue's avatar Bryan O'Donoghue Committed by Greg Kroah-Hartman

greybus: loopback: use dev_name to populate sysfsname

dev_name() will give a nice string representing the end0:X:Y:Z:W name
mitigating the need to pick apart the various nested data structures and
print out their various identifiers.
Signed-off-by: default avatarBryan O'Donoghue <bryan.odonoghue@linaro.org>
Suggested-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: default avatarPatrick Titiano <ptitiano@baylibre.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parent fbb8edba
......@@ -931,11 +931,8 @@ static int gb_loopback_connection_init(struct gb_connection *connection)
}
/* Create per-connection sysfs and debugfs data-points */
snprintf(name, sizeof(name), "raw_latency_endo0:%d:%d:%d:%d",
connection->bundle->intf->module->module_id,
connection->bundle->intf->interface_id,
connection->bundle->id,
connection->intf_cport_id);
snprintf(name, sizeof(name), "raw_latency_endo0:%s",
dev_name(&connection->dev));
gb->file = debugfs_create_file(name, S_IFREG | S_IRUGO, gb_dev.root, gb,
&gb_loopback_debugfs_latency_ops);
gb->connection = connection;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment