greybus: loopback: remove module specific identifier from debugfs name
authorBryan O'Donoghue <bryan.odonoghue@linaro.org>
Wed, 23 Sep 2015 16:31:34 +0000 (09:31 -0700)
committerGreg Kroah-Hartman <gregkh@google.com>
Wed, 23 Sep 2015 19:46:16 +0000 (12:46 -0700)
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: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Reviewed-by: Patrick Titiano <ptitiano@baylibre.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/loopback.c

index e728216..5a6354e 100644 (file)
@@ -883,11 +883,10 @@ static int gb_loopback_connection_init(struct gb_connection *connection)
                return -ENOMEM;
        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);
        if (!gb_dev.count) {
-               snprintf(name, sizeof(name), "raw_latency_endo0:%d",
-                        connection->bundle->intf->module->module_id);
+               snprintf(name, sizeof(name), "raw_latency_endo0");
                gb_dev.file = debugfs_create_file(name, S_IFREG | S_IRUGO,
                                                  gb_dev.root, &gb_dev,
                                  &gb_loopback_debugfs_dev_latency_ops);