linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fix of_flat_dt_is_compatible to match the full compatible string
@ 2010-07-22 23:28 Stuart Yoder
  2010-07-23  2:45 ` Benjamin Herrenschmidt
  0 siblings, 1 reply; 3+ messages in thread
From: Stuart Yoder @ 2010-07-22 23:28 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: Stuart Yoder

From: Stuart Yoder <stuart.yoder@freescale.com>

With the previous string comparison, a device tree
compatible of "foo-bar" would match as compatible
with a driver looking for "foo".

Signed-off-by: Stuart Yoder <stuart.yoder@freescale.com>
---
 drivers/of/fdt.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
index dee4fb5..f5239c0 100644
--- a/drivers/of/fdt.c
+++ b/drivers/of/fdt.c
@@ -169,7 +169,7 @@ int __init of_flat_dt_is_compatible(unsigned long node, const char *compat)
 	if (cp == NULL)
 		return 0;
 	while (cplen > 0) {
-		if (strncasecmp(cp, compat, strlen(compat)) == 0)
+		if (!strcmp(cp, compat))
 			return 1;
 		l = strlen(cp) + 1;
 		cp += l;
-- 
1.6.2.5

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-07-24 22:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-22 23:28 [PATCH] fix of_flat_dt_is_compatible to match the full compatible string Stuart Yoder
2010-07-23  2:45 ` Benjamin Herrenschmidt
2010-07-24 22:00   ` Grant Likely

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).