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

greybus: loopback: remove module specific identifier from debugfs name



The datapoint we are using to return metrics across modules and cports
shouldn't have a module identifier in it i.e.

/sys/kernel/debug/gb_loopback/raw_latency_endo0
not
/sys/kernel/debug/gb_loopback/raw_latency_endo0:X

This patch removes the module_id used up to this point. Including module_id
actually ends up making life harder in user-space so dropping it.

Signed-off-by: default avatarBryan O'Donoghue <bryan.odonoghue@linaro.org>
Reviewed-by: default avatarPatrick Titiano <ptitiano@baylibre.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parent 8d8d36da
Loading
Loading
Loading
Loading
+2 −3
Original line number Original line Diff line number Diff line
@@ -883,11 +883,10 @@ static int gb_loopback_connection_init(struct gb_connection *connection)
		return -ENOMEM;
		return -ENOMEM;
	gb_loopback_reset_stats(&gb_dev);
	gb_loopback_reset_stats(&gb_dev);


	/* If this is the first connection - create a module endo0:x entries */
	/* If this is the first connection - create a module endo0 entry */
	mutex_lock(&gb_dev.mutex);
	mutex_lock(&gb_dev.mutex);
	if (!gb_dev.count) {
	if (!gb_dev.count) {
		snprintf(name, sizeof(name), "raw_latency_endo0:%d",
		snprintf(name, sizeof(name), "raw_latency_endo0");
			 connection->bundle->intf->module->module_id);
		gb_dev.file = debugfs_create_file(name, S_IFREG | S_IRUGO,
		gb_dev.file = debugfs_create_file(name, S_IFREG | S_IRUGO,
						  gb_dev.root, &gb_dev,
						  gb_dev.root, &gb_dev,
				  &gb_loopback_debugfs_dev_latency_ops);
				  &gb_loopback_debugfs_dev_latency_ops);