From 157ab88ef64a2edccd722f120464109ceba9bac1 Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Wed, 5 Dec 2018 13:50:46 -0600 Subject: ALSA: aoa: 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. A couple of open coded iterating thru the child node names are converted to use for_each_child_of_node() instead. Signed-off-by: Rob Herring Signed-off-by: Takashi Iwai --- sound/aoa/fabrics/layout.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sound/aoa/fabrics') diff --git a/sound/aoa/fabrics/layout.c b/sound/aoa/fabrics/layout.c index 3a23fd032611..8797d42e2b76 100644 --- a/sound/aoa/fabrics/layout.c +++ b/sound/aoa/fabrics/layout.c @@ -776,7 +776,7 @@ static int check_codec(struct aoa_codec *codec, struct codec_connection *cc; /* if the codec has a 'codec' node, we require a reference */ - if (codec->node && (strcmp(codec->node->name, "codec") == 0)) { + if (of_node_name_eq(codec->node, "codec")) { snprintf(propname, sizeof(propname), "platform-%s-codec-ref", codec->name); ref = of_get_property(ldev->sound, propname, NULL); -- cgit