summaryrefslogtreecommitdiff
path: root/drivers/pinctrl
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2017-09-16 08:10:41 +0300
committerTom Rini <trini@konsulko.com>2017-10-04 18:59:44 +0300
commit9b643e312d528f291966c1f30b0d90bf3b1d43dc (patch)
tree35e3780c0aabb8af73ce19a60bb8973b3f2479cd /drivers/pinctrl
parentb44b30260ffa3dc82f4bb98b022483bb09e95353 (diff)
downloadu-boot-9b643e312d528f291966c1f30b0d90bf3b1d43dc.tar.xz
treewide: replace with error() with pr_err()
U-Boot widely uses error() as a bit noisier variant of printf(). This macro causes name conflict with the following line in include/linux/compiler-gcc.h: # define __compiletime_error(message) __attribute__((error(message))) This prevents us from using __compiletime_error(), and makes it difficult to fully sync BUILD_BUG macros with Linux. (Notice Linux's BUILD_BUG_ON_MSG is implemented by using compiletime_assert().) Let's convert error() into now treewide-available pr_err(). Done with the help of Coccinelle, excluing tools/ directory. The semantic patch I used is as follows: // <smpl> @@@@ -error +pr_err (...) // </smpl> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Simon Glass <sjg@chromium.org> [trini: Re-run Coccinelle] Signed-off-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'drivers/pinctrl')
-rw-r--r--drivers/pinctrl/mvebu/pinctrl-armada-37xx.c2
-rw-r--r--drivers/pinctrl/pinctrl-sti.c14
-rw-r--r--drivers/pinctrl/pinctrl_stm32.c2
3 files changed, 9 insertions, 9 deletions
diff --git a/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c b/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
index 27165b0007..2bf853eba1 100644
--- a/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
+++ b/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
@@ -578,7 +578,7 @@ int armada_37xx_pinctrl_probe(struct udevice *dev)
info->base = (void __iomem *)devfdt_get_addr(dev);
if (!info->base) {
- error("unable to find regmap\n");
+ pr_err("unable to find regmap\n");
return -ENODEV;
}
diff --git a/drivers/pinctrl/pinctrl-sti.c b/drivers/pinctrl/pinctrl-sti.c
index 40341b4eeb..735e412f60 100644
--- a/drivers/pinctrl/pinctrl-sti.c
+++ b/drivers/pinctrl/pinctrl-sti.c
@@ -142,7 +142,7 @@ void sti_pin_configure(struct udevice *dev, struct sti_pin_desc *pin_desc)
break;
default:
- error("%s invalid direction value: 0x%x\n",
+ pr_err("%s invalid direction value: 0x%x\n",
__func__, pin_desc->dir);
BUG();
break;
@@ -237,14 +237,14 @@ static int sti_pinctrl_set_state(struct udevice *dev, struct udevice *config)
prop_name, "#gpio-cells",
0, 0, &args);
if (ret < 0) {
- error("Can't get the gpio bank phandle: %d\n", ret);
+ pr_err("Can't get the gpio bank phandle: %d\n", ret);
return ret;
}
bank_name = fdt_getprop(blob, args.node, "st,bank-name",
&count);
if (count < 0) {
- error("Can't find bank-name property %d\n", count);
+ pr_err("Can't find bank-name property %d\n", count);
return -EINVAL;
}
@@ -254,12 +254,12 @@ static int sti_pinctrl_set_state(struct udevice *dev, struct udevice *config)
prop_name, cells,
ARRAY_SIZE(cells));
if (count < 0) {
- error("Bad pin configuration array %d\n", count);
+ pr_err("Bad pin configuration array %d\n", count);
return -EINVAL;
}
if (count > MAX_STI_PINCONF_ENTRIES) {
- error("Unsupported pinconf array count %d\n", count);
+ pr_err("Unsupported pinconf array count %d\n", count);
return -EINVAL;
}
@@ -284,13 +284,13 @@ static int sti_pinctrl_probe(struct udevice *dev)
err = uclass_get_device_by_phandle(UCLASS_SYSCON, dev,
"st,syscfg", &syscon);
if (err) {
- error("unable to find syscon device\n");
+ pr_err("unable to find syscon device\n");
return err;
}
plat->regmap = syscon_get_regmap(syscon);
if (!plat->regmap) {
- error("unable to find regmap\n");
+ pr_err("unable to find regmap\n");
return -ENODEV;
}
diff --git a/drivers/pinctrl/pinctrl_stm32.c b/drivers/pinctrl/pinctrl_stm32.c
index bf2a86c636..51fdfb3851 100644
--- a/drivers/pinctrl/pinctrl_stm32.c
+++ b/drivers/pinctrl/pinctrl_stm32.c
@@ -160,7 +160,7 @@ static int stm32_pinctrl_set_state_simple(struct udevice *dev,
config_node = fdt_node_offset_by_phandle(fdt, phandle);
if (config_node < 0) {
- error("prop pinctrl-0 index %d invalid phandle\n", i);
+ pr_err("prop pinctrl-0 index %d invalid phandle\n", i);
return -EINVAL;
}