cpufreq: Use consistent prefixing via pr_fmt

Use the more common kernel style adding a define for pr_fmt.

Miscellanea:

o Remove now unused PFX defines

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:
Joe Perches 2016-04-05 13:28:25 -07:00 committed by Rafael J. Wysocki
parent b49c22a6ca
commit 1c5864e26c
25 changed files with 181 additions and 146 deletions

View file

@ -12,6 +12,8 @@
#undef DEBUG
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/module.h>
#include <linux/types.h>
#include <linux/errno.h>
@ -138,7 +140,7 @@ static void g5_vdnap_switch_volt(int speed_mode)
usleep_range(1000, 1000);
}
if (done == 0)
pr_warn("cpufreq: Timeout in clock slewing !\n");
pr_warn("Timeout in clock slewing !\n");
}
@ -266,7 +268,7 @@ static int g5_pfunc_switch_freq(int speed_mode)
rc = pmf_call_one(pfunc_cpu_setfreq_low, NULL);
if (rc)
pr_warn("cpufreq: pfunc switch error %d\n", rc);
pr_warn("pfunc switch error %d\n", rc);
/* It's an irq GPIO so we should be able to just block here,
* I'll do that later after I've properly tested the IRQ code for
@ -282,7 +284,7 @@ static int g5_pfunc_switch_freq(int speed_mode)
usleep_range(500, 500);
}
if (done == 0)
pr_warn("cpufreq: Timeout in clock slewing !\n");
pr_warn("Timeout in clock slewing !\n");
/* If frequency is going down, last ramp the voltage */
if (speed_mode > g5_pmode_cur)
@ -368,7 +370,7 @@ static int __init g5_neo2_cpufreq_init(struct device_node *cpunode)
}
pvr_hi = (*valp) >> 16;
if (pvr_hi != 0x3c && pvr_hi != 0x44) {
pr_err("cpufreq: Unsupported CPU version\n");
pr_err("Unsupported CPU version\n");
goto bail_noprops;
}
@ -403,7 +405,7 @@ static int __init g5_neo2_cpufreq_init(struct device_node *cpunode)
root = of_find_node_by_path("/");
if (root == NULL) {
pr_err("cpufreq: Can't find root of device tree\n");
pr_err("Can't find root of device tree\n");
goto bail_noprops;
}
pfunc_set_vdnap0 = pmf_find_function(root, "set-vdnap0");
@ -411,7 +413,7 @@ static int __init g5_neo2_cpufreq_init(struct device_node *cpunode)
pmf_find_function(root, "slewing-done");
if (pfunc_set_vdnap0 == NULL ||
pfunc_vdnap0_complete == NULL) {
pr_err("cpufreq: Can't find required platform function\n");
pr_err("Can't find required platform function\n");
goto bail_noprops;
}
@ -491,7 +493,7 @@ static int __init g5_pm72_cpufreq_init(struct device_node *cpunode)
if (cpuid != NULL)
eeprom = of_get_property(cpuid, "cpuid", NULL);
if (eeprom == NULL) {
pr_err("cpufreq: Can't find cpuid EEPROM !\n");
pr_err("Can't find cpuid EEPROM !\n");
rc = -ENODEV;
goto bail;
}
@ -509,7 +511,7 @@ static int __init g5_pm72_cpufreq_init(struct device_node *cpunode)
break;
}
if (hwclock == NULL) {
pr_err("cpufreq: Can't find i2c clock chip !\n");
pr_err("Can't find i2c clock chip !\n");
rc = -ENODEV;
goto bail;
}
@ -537,7 +539,7 @@ static int __init g5_pm72_cpufreq_init(struct device_node *cpunode)
/* Check we have minimum requirements */
if (pfunc_cpu_getfreq == NULL || pfunc_cpu_setfreq_high == NULL ||
pfunc_cpu_setfreq_low == NULL || pfunc_slewing_done == NULL) {
pr_err("cpufreq: Can't find platform functions !\n");
pr_err("Can't find platform functions !\n");
rc = -ENODEV;
goto bail;
}
@ -565,7 +567,7 @@ static int __init g5_pm72_cpufreq_init(struct device_node *cpunode)
/* Get max frequency from device-tree */
valp = of_get_property(cpunode, "clock-frequency", NULL);
if (!valp) {
pr_err("cpufreq: Can't find CPU frequency !\n");
pr_err("Can't find CPU frequency !\n");
rc = -ENODEV;
goto bail;
}
@ -581,7 +583,7 @@ static int __init g5_pm72_cpufreq_init(struct device_node *cpunode)
/* Check for machines with no useful settings */
if (il == ih) {
pr_warn("cpufreq: No low frequency mode available on this model !\n");
pr_warn("No low frequency mode available on this model !\n");
rc = -ENODEV;
goto bail;
}
@ -592,7 +594,7 @@ static int __init g5_pm72_cpufreq_init(struct device_node *cpunode)
/* Sanity check */
if (min_freq >= max_freq || min_freq < 1000) {
pr_err("cpufreq: Can't calculate low frequency !\n");
pr_err("Can't calculate low frequency !\n");
rc = -ENXIO;
goto bail;
}
@ -651,7 +653,7 @@ static int __init g5_cpufreq_init(void)
/* Get first CPU node */
cpunode = of_cpu_device_node_get(0);
if (cpunode == NULL) {
pr_err("cpufreq: Can't find any CPU node\n");
pr_err("Can't find any CPU node\n");
return -ENODEV;
}