From: Jacek Anaszewski <j.anaszewski@samsung.com>
To: linux-leds@vger.kernel.org, devicetree@vger.kernel.org,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: kyungmin.park@samsung.com, b.zolnierkie@samsung.com,
Jacek Anaszewski <j.anaszewski@samsung.com>,
Grant Likely <grant.likely@linaro.org>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Michal Simek <monstr@monstr.eu>
Subject: [PATCH/RFC v5 1/2] of: add of_node_ncmp wrapper
Date: Wed, 20 Aug 2014 15:42:42 +0200 [thread overview]
Message-ID: <1408542163-32764-2-git-send-email-j.anaszewski@samsung.com> (raw)
In-Reply-To: <1408542163-32764-1-git-send-email-j.anaszewski@samsung.com>
The wrapper for strnicmp is required for checking whether a node has
expected prefix.
Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Grant Likely <grant.likely@linaro.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Michal Simek <monstr@monstr.eu>
---
arch/sparc/include/asm/prom.h | 1 +
include/linux/of.h | 1 +
2 files changed, 2 insertions(+)
diff --git a/arch/sparc/include/asm/prom.h b/arch/sparc/include/asm/prom.h
index d955c8d..272f87a 100644
--- a/arch/sparc/include/asm/prom.h
+++ b/arch/sparc/include/asm/prom.h
@@ -30,6 +30,7 @@
#define of_compat_cmp(s1, s2, l) strncmp((s1), (s2), (l))
#define of_prop_cmp(s1, s2) strcasecmp((s1), (s2))
#define of_node_cmp(s1, s2) strcmp((s1), (s2))
+#define of_node_ncmp(s1, s2, n) strnicmp((s1), (s2), (n))
struct of_irq_controller {
unsigned int (*irq_build)(struct device_node *, unsigned int, void *);
diff --git a/include/linux/of.h b/include/linux/of.h
index 6c4363b..b1e11ba 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -197,6 +197,7 @@ static inline unsigned long of_read_ulong(const __be32 *cell, int size)
#define of_compat_cmp(s1, s2, l) strcasecmp((s1), (s2))
#define of_prop_cmp(s1, s2) strcmp((s1), (s2))
#define of_node_cmp(s1, s2) strcasecmp((s1), (s2))
+#define of_node_ncmp(s1, s2, n) strnicmp((s1), (s2), (n))
#endif
/* flag descriptions */
--
1.7.9.5
next prev parent reply other threads:[~2014-08-20 13:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-20 13:42 [PATCH/RFC v5 0/2] LED / flash API integration - Flash Manager Jacek Anaszewski
2014-08-20 13:42 ` Jacek Anaszewski [this message]
2014-08-20 13:42 ` [PATCH/RFC v5 2/2] leds: Add Flash Manager functionality Jacek Anaszewski
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=1408542163-32764-2-git-send-email-j.anaszewski@samsung.com \
--to=j.anaszewski@samsung.com \
--cc=b.zolnierkie@samsung.com \
--cc=benh@kernel.crashing.org \
--cc=devicetree@vger.kernel.org \
--cc=grant.likely@linaro.org \
--cc=kyungmin.park@samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=monstr@monstr.eu \
/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
all inboxes | Powered by JetHome®