diff options
author | Dave Airlie <airlied@redhat.com> | 2017-03-23 05:05:13 +0300 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2017-03-23 05:05:13 +0300 |
commit | 65d1086c44791112188f6aebbdc3a27cab3736d3 (patch) | |
tree | f769c133e61c54e34e91aa9ecf1d3504a6eb4fb4 /drivers/cpufreq/cpufreq.c | |
parent | edd849e5448c4f6ddc04a5fa1ac5479176660c27 (diff) | |
parent | 97da3854c526d3a6ee05c849c96e48d21527606c (diff) | |
download | linux-65d1086c44791112188f6aebbdc3a27cab3736d3.tar.xz |
BackMerge tag 'v4.11-rc3' into drm-next
Linux 4.11-rc3 as requested by Daniel
Diffstat (limited to 'drivers/cpufreq/cpufreq.c')
-rw-r--r-- | drivers/cpufreq/cpufreq.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index a47543281864..b8ff617d449d 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c @@ -680,9 +680,11 @@ static ssize_t show_cpuinfo_cur_freq(struct cpufreq_policy *policy, char *buf) { unsigned int cur_freq = __cpufreq_get(policy); - if (!cur_freq) - return sprintf(buf, "<unknown>"); - return sprintf(buf, "%u\n", cur_freq); + + if (cur_freq) + return sprintf(buf, "%u\n", cur_freq); + + return sprintf(buf, "<unknown>\n"); } /** @@ -2532,4 +2534,5 @@ static int __init cpufreq_core_init(void) return 0; } +module_param(off, int, 0444); core_initcall(cpufreq_core_init); |