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

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
Loading
Loading
Loading
Loading
+2 −5
Original line number Diff line number Diff line
@@ -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;