diff options
author | Geert Uytterhoeven <geert+renesas@glider.be> | 2019-07-31 12:41:16 +0300 |
---|---|---|
committer | Geert Uytterhoeven <geert+renesas@glider.be> | 2019-08-08 11:18:57 +0300 |
commit | 6da53cfa0f8300c85c7b63c9a6951400474a142c (patch) | |
tree | 2d9b3a22ffb9eb43187335f69e8556a7cf934707 /drivers/pinctrl/sh-pfc/gpio.c | |
parent | 2f64dc70baba18dc0b2d91d92f13bda7f2f28112 (diff) | |
download | linux-6da53cfa0f8300c85c7b63c9a6951400474a142c.tar.xz |
pinctrl: sh-pfc: Use dev_notice_once() instead of open-coding
At the time of commit 9a643c9a11259955 ("sh-pfc: Convert message
printing from pr_* to dev_*"), the dev_*_once() variants didn't exist
yet, so the once behavior was open-coded.
Since commit e135303bd5bebcd2 ("device: Add dev_<level>_once variants")
they do, so "revert" to the good practice of using a helper.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Ulrich Hecht <uli+renesas@fpond.eu>
Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Diffstat (limited to 'drivers/pinctrl/sh-pfc/gpio.c')
-rw-r--r-- | drivers/pinctrl/sh-pfc/gpio.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/pinctrl/sh-pfc/gpio.c b/drivers/pinctrl/sh-pfc/gpio.c index 97c1332c1045..64c09aa374ae 100644 --- a/drivers/pinctrl/sh-pfc/gpio.c +++ b/drivers/pinctrl/sh-pfc/gpio.c @@ -255,18 +255,13 @@ static int gpio_pin_setup(struct sh_pfc_chip *chip) #ifdef CONFIG_PINCTRL_SH_FUNC_GPIO 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; - if (!__print_once) { - dev_notice(pfc->dev, - "Use of GPIO API for function requests is deprecated." - " Convert to pinctrl\n"); - __print_once = true; - } + dev_notice_once(pfc->dev, + "Use of GPIO API for function requests is deprecated, convert to pinctrl\n"); if (mark == 0) return -EINVAL; |