Skip to content

Commit

Permalink
drivers: firmware: psci: use pr_* log functions instead of printf()
Browse files Browse the repository at this point in the history
In Linux, the warning messages are printed out by pr_warn().

We can use Linux-like log functions in tree-wide.

Signed-off-by: Masahiro Yamada <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
  • Loading branch information
masahir0y authored and trini committed Dec 4, 2017
1 parent 8a3556e commit af4e6d3
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions drivers/firmware/psci.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include <libfdt.h>
#include <linux/arm-smccc.h>
#include <linux/errno.h>
#include <linux/printk.h>
#include <linux/psci.h>

psci_fn *invoke_psci_fn;
Expand Down Expand Up @@ -48,7 +49,7 @@ static int psci_bind(struct udevice *dev)
ret = device_bind_driver(dev, "psci-sysreset", "psci-sysreset",
NULL);
if (ret)
debug("PSCI System Reset was not bound.\n");
pr_debug("PSCI System Reset was not bound.\n");
}

return 0;
Expand All @@ -62,7 +63,7 @@ static int psci_probe(struct udevice *dev)
method = fdt_stringlist_get(gd->fdt_blob, dev_of_offset(dev), "method",
0, NULL);
if (!method) {
printf("missing \"method\" property\n");
pr_warn("missing \"method\" property\n");
return -ENXIO;
}

Expand All @@ -71,7 +72,7 @@ static int psci_probe(struct udevice *dev)
} else if (!strcmp("smc", method)) {
invoke_psci_fn = __invoke_psci_fn_smc;
} else {
printf("invalid \"method\" property: %s\n", method);
pr_warn("invalid \"method\" property: %s\n", method);
return -EINVAL;
}

Expand Down

0 comments on commit af4e6d3

Please sign in to comment.