Commit bae9fb2
committed
soc/tegra: pmc: Simplify debugfs initialization
debugfs calls should generally not be error-checked to simplify the case
where debugfs is disabled. Since this driver is built-in and has the
sysfs bind/unbind attributes disabled, it cannot be unloaded, so there
is no need to hold onto a reference to the debugfs files that are
created.
We can further simplify this by moving the debugfs file creation to a
later stage to avoid any cleanup we might have to do during error unwind
operations. This is also a little cleaner because the debugfs file
relies on data structures that are created at a later point than when
the file was previously created.
Suggested-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>1 parent e180cf8 commit bae9fb2
1 file changed
Lines changed: 4 additions & 22 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
396 | 396 | | |
397 | 397 | | |
398 | 398 | | |
399 | | - | |
400 | 399 | | |
401 | 400 | | |
402 | 401 | | |
| |||
431 | 430 | | |
432 | 431 | | |
433 | 432 | | |
434 | | - | |
435 | 433 | | |
436 | 434 | | |
437 | 435 | | |
| |||
1190 | 1188 | | |
1191 | 1189 | | |
1192 | 1190 | | |
1193 | | - | |
1194 | | - | |
1195 | | - | |
1196 | | - | |
1197 | | - | |
1198 | | - | |
1199 | | - | |
1200 | | - | |
1201 | | - | |
1202 | | - | |
1203 | 1191 | | |
1204 | 1192 | | |
1205 | 1193 | | |
| |||
3026 | 3014 | | |
3027 | 3015 | | |
3028 | 3016 | | |
3029 | | - | |
3030 | | - | |
3031 | | - | |
3032 | | - | |
3033 | | - | |
3034 | | - | |
3035 | 3017 | | |
3036 | 3018 | | |
3037 | | - | |
| 3019 | + | |
3038 | 3020 | | |
3039 | 3021 | | |
3040 | 3022 | | |
3041 | | - | |
| 3023 | + | |
3042 | 3024 | | |
3043 | 3025 | | |
3044 | 3026 | | |
| |||
3061 | 3043 | | |
3062 | 3044 | | |
3063 | 3045 | | |
| 3046 | + | |
| 3047 | + | |
3064 | 3048 | | |
3065 | 3049 | | |
3066 | 3050 | | |
3067 | 3051 | | |
3068 | | - | |
3069 | | - | |
3070 | 3052 | | |
3071 | 3053 | | |
3072 | 3054 | | |
| |||
0 commit comments