From patchwork Tue Aug 30 03:41:14 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chunhe Lan X-Patchwork-Id: 112174 X-Patchwork-Delegate: vanbaren@cideas.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 292C0B6F71 for ; Tue, 30 Aug 2011 13:40:05 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id A18942809A; Tue, 30 Aug 2011 05:40:03 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id LAkVpSH4VLyL; Tue, 30 Aug 2011 05:40:03 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id A5FC928090; Tue, 30 Aug 2011 05:40:00 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 548B428090 for ; Tue, 30 Aug 2011 05:39:58 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id FGrsX2LLBGmx for ; Tue, 30 Aug 2011 05:39:57 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from ch1outboundpool.messaging.microsoft.com (ch1ehsobe006.messaging.microsoft.com [216.32.181.186]) by theia.denx.de (Postfix) with ESMTPS id 1B54D2808D for ; Tue, 30 Aug 2011 05:39:55 +0200 (CEST) Received: from mail53-ch1-R.bigfish.com (216.32.181.169) by CH1EHSOBE004.bigfish.com (10.43.70.54) with Microsoft SMTP Server id 14.1.225.22; Tue, 30 Aug 2011 03:39:54 +0000 Received: from mail53-ch1 (localhost.localdomain [127.0.0.1]) by mail53-ch1-R.bigfish.com (Postfix) with ESMTP id 05726740730 for ; Tue, 30 Aug 2011 03:39:54 +0000 (UTC) X-SpamScore: 0 X-BigFish: VS0(zzzz1202hzz8275bhz2dh2a8h668h839h61h) X-Spam-TCS-SCL: 0:0 X-Forefront-Antispam-Report: CIP:70.37.183.190; KIP:(null); UIP:(null); IPVD:NLI; H:mail.freescale.net; RD:none; EFVD:NLI Received: from mail53-ch1 (localhost.localdomain [127.0.0.1]) by mail53-ch1 (MessageSwitch) id 1314675565470766_10828; Tue, 30 Aug 2011 03:39:25 +0000 (UTC) Received: from CH1EHSMHS022.bigfish.com (snatpool1.int.messaging.microsoft.com [10.43.68.252]) by mail53-ch1.bigfish.com (Postfix) with ESMTP id 205ECDE8075 for ; Tue, 30 Aug 2011 03:37:45 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by CH1EHSMHS022.bigfish.com (10.43.70.22) with Microsoft SMTP Server (TLS) id 14.1.225.22; Tue, 30 Aug 2011 03:37:44 +0000 Received: from az33smr01.freescale.net (10.64.34.199) by 039-SN1MMR1-001.039d.mgd.msft.net (10.84.1.13) with Microsoft SMTP Server id 14.1.323.2; Mon, 29 Aug 2011 22:37:43 -0500 Received: from localhost.localdomain ([10.193.20.71]) by az33smr01.freescale.net (8.13.1/8.13.0) with ESMTP id p7U3bflv008071; Mon, 29 Aug 2011 22:37:42 -0500 (CDT) From: Chunhe Lan To: Date: Tue, 30 Aug 2011 11:41:14 +0800 Message-ID: <1314675674-9825-1-git-send-email-Chunhe.Lan@freescale.com> X-Mailer: git-send-email 1.5.6.5 MIME-Version: 1.0 X-OriginatorOrg: freescale.com Cc: scottwood@freescale.com, kumar.gala@freescale.com, Chunhe Lan Subject: [U-Boot] [PATCH 1/2 v5] fdt: Add a do_fixup_by_path_string() function X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.9 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de The do_fixup_by_path_string() will set the specified node's property to the value contained in "status". It would just be an inline wrapper for do_fixup_by_path() that calls strlen on the argument. Signed-off-by: Chunhe Lan --- include/fdt_support.h | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/include/fdt_support.h b/include/fdt_support.h index 863024f..1de4a1d 100644 --- a/include/fdt_support.h +++ b/include/fdt_support.h @@ -36,6 +36,13 @@ void do_fixup_by_path(void *fdt, const char *path, const char *prop, const void *val, int len, int create); void do_fixup_by_path_u32(void *fdt, const char *path, const char *prop, u32 val, int create); + +static inline void do_fixup_by_path_string(void *fdt, const char *path, + const char *prop, const char *status) +{ + do_fixup_by_path(fdt, path, prop, status, strlen(status) + 1, 1); +} + void do_fixup_by_prop(void *fdt, const char *pname, const void *pval, int plen, const char *prop, const void *val, int len,