From: Stuart Yoder <stuart.yoder@freescale.com>
To: linuxppc-dev@lists.ozlabs.org
Cc: Stuart Yoder <stuart.yoder@freescale.com>
Subject: [PATCH] fix of_flat_dt_is_compatible to match the full compatible string
Date: Thu, 22 Jul 2010 18:28:50 -0500 [thread overview]
Message-ID: <1279841330-28695-1-git-send-email-stuart.yoder@freescale.com> (raw)
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
next reply other threads:[~2010-07-22 23:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-22 23:28 Stuart Yoder [this message]
2010-07-23 2:45 ` [PATCH] fix of_flat_dt_is_compatible to match the full compatible string Benjamin Herrenschmidt
2010-07-24 22:00 ` Grant Likely
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1279841330-28695-1-git-send-email-stuart.yoder@freescale.com \
--to=stuart.yoder@freescale.com \
--cc=linuxppc-dev@lists.ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).