summaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl/renesas/core.c
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert+renesas@glider.be>2021-01-11 17:50:13 +0100
committerGeert Uytterhoeven <geert+renesas@glider.be>2021-01-12 10:45:43 +0100
commit6dd169fc201d05e8da249ee2eabf1f23b0ccb1e4 (patch)
treefae0e95de9a25e74b023b3670f92b3092f87558d /drivers/pinctrl/renesas/core.c
parentLinux 5.11-rc1 (diff)
downloadlinux-6dd169fc201d05e8da249ee2eabf1f23b0ccb1e4.tar.xz
linux-6dd169fc201d05e8da249ee2eabf1f23b0ccb1e4.zip
pinctrl: renesas: checker: Restrict checks to Renesas platforms
When DEBUG is defined (e.g. if CONFIG_DEBUG_PINCTRL=y), the Renesas pin control driver runs sanity checks against the pin control tables. This may cause lots of output on the console, and can be annoying in ARM multi-platform kernels. Fix this by only running the checks when running on SuperH, or on a DT platform supported by the Renesas pin controller driver. Suggested-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: Arnd Bergmann <arnd@arndb.de> Link: https://lore.kernel.org/r/20210111165013.496897-1-geert+renesas@glider.be
Diffstat (limited to 'drivers/pinctrl/renesas/core.c')
-rw-r--r--drivers/pinctrl/renesas/core.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/pinctrl/renesas/core.c b/drivers/pinctrl/renesas/core.c
index 2cc457279345..291d2c673b8f 100644
--- a/drivers/pinctrl/renesas/core.c
+++ b/drivers/pinctrl/renesas/core.c
@@ -1052,6 +1052,10 @@ static void __init sh_pfc_check_driver(const struct platform_driver *pdrv)
{
unsigned int i;
+ if (!IS_ENABLED(CONFIG_SUPERH) &&
+ !of_find_matching_node(NULL, pdrv->driver.of_match_table))
+ return;
+
sh_pfc_regs = kcalloc(SH_PFC_MAX_REGS, sizeof(*sh_pfc_regs),
GFP_KERNEL);
if (!sh_pfc_regs)