drivers: base: power: remove wakeup_sources_stats_dentry variable
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 18 Jun 2019 15:34:16 +0000 (17:34 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 19 Jun 2019 09:42:51 +0000 (11:42 +0200)
wakeup_sources_stats_dentry is assigned when the debugfs file is
created, but then never used ever again.  So no need for it at all, just
remove it and call debugfs_create_file() on its own.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/base/power/wakeup.c

index 5b2b6a05a4f3c98dc2137f05f375f8df85e85b60..ee31d4f8d856ed486bb5612b940994e4bb60c7be 100644 (file)
@@ -968,8 +968,6 @@ void pm_wakep_autosleep_enabled(bool set)
 }
 #endif /* CONFIG_PM_AUTOSLEEP */
 
-static struct dentry *wakeup_sources_stats_dentry;
-
 /**
  * print_wakeup_source_stats - Print wakeup source statistics information.
  * @m: seq_file to print the statistics into.
@@ -1099,8 +1097,8 @@ static const struct file_operations wakeup_sources_stats_fops = {
 
 static int __init wakeup_sources_debugfs_init(void)
 {
-       wakeup_sources_stats_dentry = debugfs_create_file("wakeup_sources",
-                       S_IRUGO, NULL, NULL, &wakeup_sources_stats_fops);
+       debugfs_create_file("wakeup_sources", S_IRUGO, NULL, NULL,
+                           &wakeup_sources_stats_fops);
        return 0;
 }