| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * OMAP Power Management debug routines |
|---|
| 3 | 4 | * |
|---|
| .. | .. |
|---|
| 13 | 14 | * Jouni Hogander |
|---|
| 14 | 15 | * |
|---|
| 15 | 16 | * 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. |
|---|
| 20 | 17 | */ |
|---|
| 21 | 18 | |
|---|
| 22 | 19 | #include <linux/kernel.h> |
|---|
| .. | .. |
|---|
| 36 | 33 | #include "cm2xxx_3xxx.h" |
|---|
| 37 | 34 | #include "prm2xxx_3xxx.h" |
|---|
| 38 | 35 | #include "pm.h" |
|---|
| 39 | | - |
|---|
| 40 | | -u32 enable_off_mode; |
|---|
| 41 | 36 | |
|---|
| 42 | 37 | #ifdef CONFIG_DEBUG_FS |
|---|
| 43 | 38 | #include <linux/debugfs.h> |
|---|
| .. | .. |
|---|
| 193 | 188 | return 0; |
|---|
| 194 | 189 | |
|---|
| 195 | 190 | 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); |
|---|
| 199 | 193 | |
|---|
| 200 | 194 | return 0; |
|---|
| 201 | 195 | } |
|---|
| .. | .. |
|---|
| 233 | 227 | return 0; |
|---|
| 234 | 228 | |
|---|
| 235 | 229 | d = debugfs_create_dir("pm_debug", NULL); |
|---|
| 236 | | - if (!d) |
|---|
| 237 | | - return -EINVAL; |
|---|
| 238 | 230 | |
|---|
| 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); |
|---|
| 241 | 233 | |
|---|
| 242 | 234 | pwrdm_for_each(pwrdms_setup, (void *)d); |
|---|
| 243 | 235 | |
|---|
| 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); |
|---|
| 246 | 238 | pm_dbg_init_done = 1; |
|---|
| 247 | 239 | |
|---|
| 248 | 240 | return 0; |
|---|