Skip to contentSkip to conversation

drm: imx: Use of_node_name_eq for node name comparisons

PATCH In review Rob Herring 2 participants 3 messages Dec 5, 2018 – Feb 14, 2019

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm: imx: Use of_node_name_eq for node name comparisons

Convert string compares of DT node names to use of_node_name_eq helper instead. This removes direct access to the node name pointer.

For instances using of_node_cmp, this has the side effect of now using case sensitive comparisons. This should not matter for any FDT based system which this is.

---
 drivers/gpu/drm/imx/imx-drm-core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/imx/imx-drm-core.c +1 -1
index 0e6942f21a4e..99ec6e5f89dc 100644
@@ -198,7 +198,7 @@ static int compare_of(struct device *dev, void *data)
 	}
 
 	/* Special case for LDB, one device for two channels */
-	if (of_node_cmp(np->name, "lvds-channel") == 0) {
+	if (of_node_name_eq(np, "lvds-channel")) {
 		np = of_get_parent(np);
 		of_node_put(np);
 	}
Signature · 6 lines
2.19.1

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#1 lore raw
Quoted 8 lines · Rob Herring

Convert string compares of DT node names to use of_node_name_eq helper instead. This removes direct access to the node name pointer.

For instances using of_node_cmp, this has the side effect of now using case sensitive comparisons. This should not matter for any FDT based system which this is.

Quoted 7 lines
---
 drivers/gpu/drm/imx/imx-drm-core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Philipp, can I get an ack on this? I can commit it.

Rob

Acked-by
#2 lore raw

Hi Rob,

Quoted 17 lines · Rob Herring
Quoted 8 lines · Rob Herring

Convert string compares of DT node names to use of_node_name_eq helper instead. This removes direct access to the node name pointer.

For instances using of_node_cmp, this has the side effect of now using case sensitive comparisons. This should not matter for any FDT based system which this is.

Quoted 7 lines
---
 drivers/gpu/drm/imx/imx-drm-core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 1 line

Philipp, can I get an ack on this? I can commit it.

Thank you,

regards
Philipp
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel