Merge tag 'leds_for_4.8' of git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewsk...
[deliverable/linux.git] / drivers / staging / android / sync_debug.c
index 864ad0103435dac4bdf642f010c5a5e35c0adada..4c5a85595a85b7d6339804d20a80a42b0aa5eabf 100644 (file)
@@ -15,9 +15,7 @@
  */
 
 #include <linux/debugfs.h>
-#include "sync.h"
-
-#ifdef CONFIG_DEBUG_FS
+#include "sync_debug.h"
 
 static struct dentry *dbgfs;
 
@@ -120,7 +118,7 @@ static void sync_print_obj(struct seq_file *s, struct sync_timeline *obj)
        struct list_head *pos;
        unsigned long flags;
 
-       seq_printf(s, "%s %s: %d\n", obj->name, obj->drv_name, obj->value);
+       seq_printf(s, "%s: %d\n", obj->name, obj->value);
 
        spin_lock_irqsave(&obj->child_list_lock, flags);
        list_for_each(pos, &obj->child_list_head) {
@@ -191,12 +189,15 @@ static __init int sync_debugfs_init(void)
 {
        dbgfs = debugfs_create_dir("sync", NULL);
 
-       debugfs_create_file("info", 0444, dbgfs, NULL, &sync_info_debugfs_fops);
-
-#if IS_ENABLED(CONFIG_SW_SYNC)
-       debugfs_create_file("sw_sync", 0644, dbgfs, NULL,
-                           &sw_sync_debugfs_fops);
-#endif
+       /*
+        * The debugfs files won't ever get removed and thus, there is
+        * no need to protect it against removal races. The use of
+        * debugfs_create_file_unsafe() is actually safe here.
+        */
+       debugfs_create_file_unsafe("info", 0444, dbgfs, NULL,
+                                  &sync_info_debugfs_fops);
+       debugfs_create_file_unsafe("sw_sync", 0644, dbgfs, NULL,
+                                  &sw_sync_debugfs_fops);
 
        return 0;
 }
@@ -227,5 +228,3 @@ void sync_dump(void)
                }
        }
 }
-
-#endif
This page took 0.056563 seconds and 5 git commands to generate.