diff mbox series

[3/4] pinctrl: scmi: Check fwnode instead of machine compatible

Message ID 20241225-scmi-fwdevlink-v1-3-e9a3a5341362@nxp.com
State New
Headers show
Series scmi: Bypass set fwnode to address devlink issue | expand

Commit Message

Peng Fan (OSS) Dec. 25, 2024, 8:20 a.m. UTC
From: Peng Fan <peng.fan@nxp.com>

For the platform that not compatible with scmi pinctrl device, the
fwnode will not be set, so checking fwnode will make code simpler
and easy to maintain.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
 drivers/pinctrl/pinctrl-scmi.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
diff mbox series

Patch

diff --git a/drivers/pinctrl/pinctrl-scmi.c b/drivers/pinctrl/pinctrl-scmi.c
index df4bbcd7d1d59ac2c8ddc320dc10d702ad1ed5b2..aade6df77dbb2c391741e77c0aac3f029991e4bb 100644
--- a/drivers/pinctrl/pinctrl-scmi.c
+++ b/drivers/pinctrl/pinctrl-scmi.c
@@ -505,11 +505,6 @@  static int pinctrl_scmi_get_pins(struct scmi_pinctrl *pmx,
 	return 0;
 }
 
-static const char * const scmi_pinctrl_blocklist[] = {
-	"fsl,imx95",
-	NULL
-};
-
 static int scmi_pinctrl_probe(struct scmi_device *sdev)
 {
 	int ret;
@@ -521,7 +516,7 @@  static int scmi_pinctrl_probe(struct scmi_device *sdev)
 	if (!sdev->handle)
 		return -EINVAL;
 
-	if (of_machine_compatible_match(scmi_pinctrl_blocklist))
+	if (!dev->fwnode)
 		return -ENODEV;
 
 	handle = sdev->handle;