Commit c5e28ed7 authored by Daniel Walker's avatar Daniel Walker Committed by Liam Girdwood

drivers: regulator: core: use pr_fmt

This adds a pr_fmt line which uses the __func__ macro. I also
convert the current pr_ lines to remove their __func__ usage.

Cc: bleong@codeaurora.org
Signed-off-by: default avatarDaniel Walker <dwalker@codeaurora.org>
Acked-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: default avatarLiam Girdwood <lrg@slimlogic.co.uk>
parent 7bed08c5
...@@ -13,6 +13,8 @@ ...@@ -13,6 +13,8 @@
* *
*/ */
#define pr_fmt(fmt) "%s:" fmt, __func__
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/device.h> #include <linux/device.h>
...@@ -771,8 +773,8 @@ static int machine_constraints_voltage(struct regulator_dev *rdev, ...@@ -771,8 +773,8 @@ static int machine_constraints_voltage(struct regulator_dev *rdev,
/* else require explicit machine-level constraints */ /* else require explicit machine-level constraints */
if (cmin <= 0 || cmax <= 0 || cmax < cmin) { if (cmin <= 0 || cmax <= 0 || cmax < cmin) {
pr_err("%s: %s '%s' voltage constraints\n", pr_err("%s '%s' voltage constraints\n", "invalid",
__func__, "invalid", name); name);
return -EINVAL; return -EINVAL;
} }
...@@ -793,22 +795,22 @@ static int machine_constraints_voltage(struct regulator_dev *rdev, ...@@ -793,22 +795,22 @@ static int machine_constraints_voltage(struct regulator_dev *rdev,
/* final: [min_uV..max_uV] valid iff constraints valid */ /* final: [min_uV..max_uV] valid iff constraints valid */
if (max_uV < min_uV) { if (max_uV < min_uV) {
pr_err("%s: %s '%s' voltage constraints\n", pr_err("%s '%s' voltage constraints\n", "unsupportable",
__func__, "unsupportable", name); name);
return -EINVAL; return -EINVAL;
} }
/* use regulator's subset of machine constraints */ /* use regulator's subset of machine constraints */
if (constraints->min_uV < min_uV) { if (constraints->min_uV < min_uV) {
pr_debug("%s: override '%s' %s, %d -> %d\n", pr_debug("override '%s' %s, %d -> %d\n",
__func__, name, "min_uV", name, "min_uV",
constraints->min_uV, min_uV); constraints->min_uV, min_uV);
constraints->min_uV = min_uV; constraints->min_uV = min_uV;
} }
if (constraints->max_uV > max_uV) { if (constraints->max_uV > max_uV) {
pr_debug("%s: override '%s' %s, %d -> %d\n", pr_debug("override '%s' %s, %d -> %d\n",
__func__, name, "max_uV", name, "max_uV",
constraints->max_uV, max_uV); constraints->max_uV, max_uV);
constraints->max_uV = max_uV; constraints->max_uV = max_uV;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment