* [PATCH] pinctrl: renesas: core: Drop unneeded #ifdef CONFIG_OF
@ 2023-03-21 16:28 Geert Uytterhoeven
2023-03-21 17:04 ` Wolfram Sang
0 siblings, 1 reply; 2+ messages in thread
From: Geert Uytterhoeven @ 2023-03-21 16:28 UTC (permalink / raw)
To: Linus Walleij; +Cc: linux-renesas-soc, linux-gpio, Geert Uytterhoeven
As the of_node member of struct device always exists, and there is a
dummy of of_device_get_match_data() for the !CONFIG_OF case, there is no
longer a need to protect code using these interfaces with an #ifdef.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
To be queued in renesas-pinctrl-for-v6.4.
---
drivers/pinctrl/renesas/core.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/pinctrl/renesas/core.c b/drivers/pinctrl/renesas/core.c
index 52365b4e3faf31cc..2c8ca3d59612eaf5 100644
--- a/drivers/pinctrl/renesas/core.c
+++ b/drivers/pinctrl/renesas/core.c
@@ -1364,11 +1364,9 @@ static int sh_pfc_probe(struct platform_device *pdev)
struct sh_pfc *pfc;
int ret;
-#ifdef CONFIG_OF
if (pdev->dev.of_node)
info = of_device_get_match_data(&pdev->dev);
else
-#endif
info = (const void *)platform_get_device_id(pdev)->driver_data;
pfc = devm_kzalloc(&pdev->dev, sizeof(*pfc), GFP_KERNEL);
--
2.34.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] pinctrl: renesas: core: Drop unneeded #ifdef CONFIG_OF
2023-03-21 16:28 [PATCH] pinctrl: renesas: core: Drop unneeded #ifdef CONFIG_OF Geert Uytterhoeven
@ 2023-03-21 17:04 ` Wolfram Sang
0 siblings, 0 replies; 2+ messages in thread
From: Wolfram Sang @ 2023-03-21 17:04 UTC (permalink / raw)
To: Geert Uytterhoeven; +Cc: Linus Walleij, linux-renesas-soc, linux-gpio
[-- Attachment #1: Type: text/plain, Size: 422 bytes --]
On Tue, Mar 21, 2023 at 05:28:00PM +0100, Geert Uytterhoeven wrote:
> As the of_node member of struct device always exists, and there is a
> dummy of of_device_get_match_data() for the !CONFIG_OF case, there is no
> longer a need to protect code using these interfaces with an #ifdef.
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-03-21 17:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-21 16:28 [PATCH] pinctrl: renesas: core: Drop unneeded #ifdef CONFIG_OF Geert Uytterhoeven
2023-03-21 17:04 ` Wolfram Sang
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).