Commit 6da53cfa authored by Geert Uytterhoeven's avatar Geert Uytterhoeven

pinctrl: sh-pfc: Use dev_notice_once() instead of open-coding

At the time of commit 9a643c9a ("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 e135303b ("device: Add dev_<level>_once variants")
they do, so "revert" to the good practice of using a helper.
Signed-off-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: default avatarUlrich Hecht <uli+renesas@fpond.eu>
Reviewed-by: default avatarNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
parent 2f64dc70
...@@ -255,18 +255,13 @@ static int gpio_pin_setup(struct sh_pfc_chip *chip) ...@@ -255,18 +255,13 @@ static int gpio_pin_setup(struct sh_pfc_chip *chip)
#ifdef CONFIG_PINCTRL_SH_FUNC_GPIO #ifdef CONFIG_PINCTRL_SH_FUNC_GPIO
static int gpio_function_request(struct gpio_chip *gc, unsigned offset) static int gpio_function_request(struct gpio_chip *gc, unsigned offset)
{ {
static bool __print_once;
struct sh_pfc *pfc = gpio_to_pfc(gc); struct sh_pfc *pfc = gpio_to_pfc(gc);
unsigned int mark = pfc->info->func_gpios[offset].enum_id; unsigned int mark = pfc->info->func_gpios[offset].enum_id;
unsigned long flags; unsigned long flags;
int ret; int ret;
if (!__print_once) { dev_notice_once(pfc->dev,
dev_notice(pfc->dev, "Use of GPIO API for function requests is deprecated, convert to pinctrl\n");
"Use of GPIO API for function requests is deprecated."
" Convert to pinctrl\n");
__print_once = true;
}
if (mark == 0) if (mark == 0)
return -EINVAL; return -EINVAL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment