* [PATCH v2] pinctrl: renesas: checker: Restrict checks to Renesas platforms
@ 2021-01-11 16:50 Geert Uytterhoeven
0 siblings, 0 replies; only message in thread
From: Geert Uytterhoeven @ 2021-01-11 16:50 UTC (permalink / raw)
To: Linus Walleij
Cc: Arnd Bergmann, linux-renesas-soc, linux-sh, linux-arm-kernel,
linux-gpio, Geert Uytterhoeven
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>
---
To be queued in renesas-pinctrl-for-v5.12.
v2:
- Add Reviewed-by,
- Use IS_ENABLED().
---
drivers/pinctrl/renesas/core.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/pinctrl/renesas/core.c b/drivers/pinctrl/renesas/core.c
index b16759a321ae9c94..2bfd3006f6fda445 100644
--- a/drivers/pinctrl/renesas/core.c
+++ b/drivers/pinctrl/renesas/core.c
@@ -1066,6 +1066,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)
--
2.25.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2021-01-11 16:51 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-11 16:50 [PATCH v2] pinctrl: renesas: checker: Restrict checks to Renesas platforms Geert Uytterhoeven
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).