summaryrefslogtreecommitdiff
path: root/drivers/pinctrl/sh-pfc/gpio.c
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>2013-03-10 18:00:02 +0100
committerLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>2013-03-15 13:33:54 +0100
commit9a643c9a11259955ec6961f9a2509604c6df1cd9 (patch)
tree5409bd18f34a0d16025c672cb2a1fb6d14054e1c /drivers/pinctrl/sh-pfc/gpio.c
parent9fddc4a589c6d1bd9c935d445b1a1d216b1457ab (diff)
sh-pfc: Convert message printing from pr_* to dev_*
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Acked-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/sh-pfc/gpio.c')
-rw-r--r--drivers/pinctrl/sh-pfc/gpio.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/drivers/pinctrl/sh-pfc/gpio.c b/drivers/pinctrl/sh-pfc/gpio.c
index e299f14bc50a..d7acb06d888c 100644
--- a/drivers/pinctrl/sh-pfc/gpio.c
+++ b/drivers/pinctrl/sh-pfc/gpio.c
@@ -9,8 +9,6 @@
* for more details.
*/
-#define pr_fmt(fmt) KBUILD_MODNAME " gpio: " fmt
-
#include <linux/device.h>
#include <linux/gpio.h>
#include <linux/init.h>
@@ -273,12 +271,18 @@ static int gpio_pin_setup(struct sh_pfc_chip *chip)
static int gpio_function_request(struct gpio_chip *gc, unsigned offset)
{
+ static bool __print_once;
struct sh_pfc *pfc = gpio_to_pfc(gc);
unsigned int mark = pfc->info->func_gpios[offset].enum_id;
unsigned long flags;
int ret;
- pr_notice_once("Use of GPIO API for function requests is deprecated, convert to pinctrl\n");
+ if (!__print_once) {
+ dev_notice(pfc->dev,
+ "Use of GPIO API for function requests is deprecated."
+ " Convert to pinctrl\n");
+ __print_once = true;
+ }
if (mark == 0)
return -EINVAL;
@@ -334,9 +338,9 @@ sh_pfc_add_gpiochip(struct sh_pfc *pfc, int(*setup)(struct sh_pfc_chip *))
if (unlikely(ret < 0))
return ERR_PTR(ret);
- pr_info("%s handling gpio %u -> %u\n",
- chip->gpio_chip.label, chip->gpio_chip.base,
- chip->gpio_chip.base + chip->gpio_chip.ngpio - 1);
+ dev_info(pfc->dev, "%s handling gpio %u -> %u\n",
+ chip->gpio_chip.label, chip->gpio_chip.base,
+ chip->gpio_chip.base + chip->gpio_chip.ngpio - 1);
return chip;
}