hc
2024-01-04 1543e317f1da31b75942316931e8f491a8920811
kernel/arch/arm/mach-omap2/pm-debug.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * OMAP Power Management debug routines
34 *
....@@ -13,10 +14,6 @@
1314 * Jouni Hogander
1415 *
1516 * Based on pm.c for omap2
16
- *
17
- * This program is free software; you can redistribute it and/or modify
18
- * it under the terms of the GNU General Public License version 2 as
19
- * published by the Free Software Foundation.
2017 */
2118
2219 #include <linux/kernel.h>
....@@ -36,8 +33,6 @@
3633 #include "cm2xxx_3xxx.h"
3734 #include "prm2xxx_3xxx.h"
3835 #include "pm.h"
39
-
40
-u32 enable_off_mode;
4136
4237 #ifdef CONFIG_DEBUG_FS
4338 #include <linux/debugfs.h>
....@@ -193,9 +188,8 @@
193188 return 0;
194189
195190 d = debugfs_create_dir(pwrdm->name, (struct dentry *)dir);
196
- if (d)
197
- (void) debugfs_create_file("suspend", S_IRUGO|S_IWUSR, d,
198
- (void *)pwrdm, &pwrdm_suspend_fops);
191
+ debugfs_create_file("suspend", S_IRUGO|S_IWUSR, d, pwrdm,
192
+ &pwrdm_suspend_fops);
199193
200194 return 0;
201195 }
....@@ -233,16 +227,14 @@
233227 return 0;
234228
235229 d = debugfs_create_dir("pm_debug", NULL);
236
- if (!d)
237
- return -EINVAL;
238230
239
- (void) debugfs_create_file("count", 0444, d, NULL, &pm_dbg_counters_fops);
240
- (void) debugfs_create_file("time", 0444, d, NULL, &pm_dbg_timers_fops);
231
+ debugfs_create_file("count", 0444, d, NULL, &pm_dbg_counters_fops);
232
+ debugfs_create_file("time", 0444, d, NULL, &pm_dbg_timers_fops);
241233
242234 pwrdm_for_each(pwrdms_setup, (void *)d);
243235
244
- (void) debugfs_create_file("enable_off_mode", S_IRUGO | S_IWUSR, d,
245
- &enable_off_mode, &pm_dbg_option_fops);
236
+ debugfs_create_file("enable_off_mode", S_IRUGO | S_IWUSR, d,
237
+ &enable_off_mode, &pm_dbg_option_fops);
246238 pm_dbg_init_done = 1;
247239
248240 return 0;