From patchwork Wed Aug 20 13:42:42 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacek Anaszewski X-Patchwork-Id: 4751641 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 9A02B9F344 for ; Wed, 20 Aug 2014 13:51:09 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A2F6A20103 for ; Wed, 20 Aug 2014 13:51:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5F2C320170 for ; Wed, 20 Aug 2014 13:51:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752407AbaHTNnA (ORCPT ); Wed, 20 Aug 2014 09:43:00 -0400 Received: from mailout4.samsung.com ([203.254.224.34]:25486 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752386AbaHTNm6 (ORCPT ); Wed, 20 Aug 2014 09:42:58 -0400 Received: from epcpsbgm2.samsung.com (epcpsbgm2 [203.254.230.27]) by mailout4.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0NAL003XNY3KKX40@mailout4.samsung.com>; Wed, 20 Aug 2014 22:42:56 +0900 (KST) X-AuditID: cbfee61b-f79f86d00000144c-03-53f4a5e0f928 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id C1.41.05196.0E5A4F35; Wed, 20 Aug 2014 22:42:56 +0900 (KST) Received: from AMDC2362.DIGITAL.local ([106.120.53.23]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0NAL009T5Y3A8880@mmp2.samsung.com>; Wed, 20 Aug 2014 22:42:56 +0900 (KST) From: Jacek Anaszewski 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 , Grant Likely , Benjamin Herrenschmidt , Michal Simek Subject: [PATCH/RFC v5 1/2] of: add of_node_ncmp wrapper Date: Wed, 20 Aug 2014 15:42:42 +0200 Message-id: <1408542163-32764-2-git-send-email-j.anaszewski@samsung.com> X-Mailer: git-send-email 1.7.9.5 In-reply-to: <1408542163-32764-1-git-send-email-j.anaszewski@samsung.com> References: <1408542163-32764-1-git-send-email-j.anaszewski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrELMWRmVeSWpSXmKPExsVy+t9jQd0HS78EG5xeZGyxccZ6VosPTa3M FvOPnGO1OPBnB6NF79XnjBZnm96wW1zeNYfNYuubdYwWPRu2slo8+XiaxYHLo+dNC6vHnWt7 2Dz+dk1h9ujbsorR4/MmuQDWKC6blNSczLLUIn27BK6M02sXMhXc5a54vn4HWwPje84uRk4O CQETiY7Lx9khbDGJC/fWs3UxcnEICUxnlJjesZsVwmlnknjwvpENpIpNwFDi54vXTCC2iEC5 RM/7Z2AdzAIvGCV2Nq9jBEkIC1hI7Pu3jRXEZhFQlVi1fS4ziM0r4CFxaeUSIJsDaJ2CxJxJ NiAmp4CnxLcNtSAVQkAV+z/8Zp/AyLuAkWEVo2hqQXJBcVJ6rpFecWJucWleul5yfu4mRnDI PZPewbiqweIQowAHoxIP741FX4KFWBPLiitzDzFKcDArifC2dwKFeFMSK6tSi/Lji0pzUosP MUpzsCiJ8x5stQ4UEkhPLEnNTk0tSC2CyTJxcEo1MHJ+FnV6yVavPy+c8ei/lSLPF2fkM/xj T3i0krtixebEVu/j356VlLxujXt/8pXp1M3Gixkaz0Z8M53yvLbC4sm0w6d9n3CJTxD0NV17 s7cy/nN7xlVBiW3+r62thZle825Xbp92fmOE9HpB4dU/fLbEW29TuNMhfv6a7kGLlVM5/YVq t/Asn6bEUpyRaKjFXFScCABoTa7eNQIAAA== Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The wrapper for strnicmp is required for checking whether a node has expected prefix. Signed-off-by: Jacek Anaszewski Acked-by: Kyungmin Park Cc: Grant Likely Cc: Benjamin Herrenschmidt Cc: Michal Simek --- 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 */