OSDN Git Service

pinctrl: use dev_err() to show message in pinctrl_register_one_pin()
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Tue, 21 Jul 2015 06:25:26 +0000 (15:25 +0900)
committerLinus Walleij <linus.walleij@linaro.org>
Mon, 27 Jul 2015 12:43:43 +0000 (14:43 +0200)
Use dev_err() rather than pr_err() to display the error message.
(Besides, dev_err() is already used 7 lines below in this function.)

Also, drop the redundant information "on %s" because dev_err() shows
which device the message is related to.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/core.c

index 8b8f3a0..69723e0 100644 (file)
@@ -231,8 +231,7 @@ static int pinctrl_register_one_pin(struct pinctrl_dev *pctldev,
 
        pindesc = pin_desc_get(pctldev, number);
        if (pindesc != NULL) {
-               pr_err("pin %d already registered on %s\n", number,
-                      pctldev->desc->name);
+               dev_err(pctldev->dev, "pin %d already registered\n", number);
                return -EINVAL;
        }