From patchwork Mon Jul 17 03:18:39 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 107865 Delivered-To: patch@linaro.org Received: by 10.140.101.44 with SMTP id t41csp4013194qge; Sun, 16 Jul 2017 20:19:25 -0700 (PDT) X-Received: by 10.80.205.217 with SMTP id h25mr15976949edj.59.1500261565005; Sun, 16 Jul 2017 20:19:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1500261564; cv=none; d=google.com; s=arc-20160816; b=JpXm2EyVhon6LyBz384hiYqPwV7itk5q3rwWGaIx7oRYIGefliR/Xx7lq5YhHlO+AA eghwPHE1ALDzSf82smwyTqN7pwMHxAGs7jk3OlBjIw38bjLlJ82IR46pdQ7dDyv2TDma c7VHfys3AUQbcqHV2+gG/NbtpE2tkDBuSLqA3VnWW7XYgfYGpng8IUmcCHm293dcqi6l fKpku514h6zXgqdlQhhC+XOFXlzo/OtIffBZp5QlonUAGGAwaP9QWKkT3E53VToCXIjU ZFL7qThpp5CARYvVGehPqB3kwXgyuCu2zZ5xFVyUdgbyHsp9/4va3B93+7gwe6vXx/61 nJag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:message-id:date:to:from:dkim-signature :dkim-filter:arc-authentication-results; bh=JdlMhrwXEO70m/qbU7w3y6np7l489qmpRGOEBbgG0kY=; b=p1a72sobCpQ0yGCsifruQLruyFX39LV/tWoYG301QpGGuEF3N8uKA1XJI6CKh+NlJI cSkXlwnUP8CoVgaIPBNAgv1/sly/zIEgoMn4Kv2X+/vaJU9VLeNIlTPvMjactCin/hqi 2jNwGIU/gmfC9tzOJPRGstsjuxNdMFNW2zKShcvUVdMW0+sHBXGFEsijcKU6rQEYLIzm bCXhoimtaUeXgWahkcVo3pb/ryKYLrsnfOnn2iOsqHDhK7ev0+P/IOm1NW7VXOw/Hsd7 jE7TE4ByTMZQ732Mi/hTrffX6qvNecFA/g1W2nabjG2kKWeZ1ARHDB1dN0d2VdFkbrxo aiww== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@nifty.com header.b=0QDIc+2W; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Return-Path: Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id p60si11429042edd.379.2017.07.16.20.19.24; Sun, 16 Jul 2017 20:19:24 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) client-ip=81.169.180.215; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@nifty.com header.b=0QDIc+2W; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by lists.denx.de (Postfix, from userid 105) id 44E7CC21D7D; Mon, 17 Jul 2017 03:19:21 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 8C091C21C39; Mon, 17 Jul 2017 03:19:19 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id EAD26C21C39; Mon, 17 Jul 2017 03:19:17 +0000 (UTC) Received: from conuserg-11.nifty.com (conuserg-11.nifty.com [210.131.2.78]) by lists.denx.de (Postfix) with ESMTPS id DB39FC21C2A for ; Mon, 17 Jul 2017 03:19:16 +0000 (UTC) Received: from grover.sesame (FL1-122-131-185-176.osk.mesh.ad.jp [122.131.185.176]) (authenticated) by conuserg-11.nifty.com with ESMTP id v6H3ImaQ026594; Mon, 17 Jul 2017 12:18:48 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-11.nifty.com v6H3ImaQ026594 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1500261529; bh=xnB0mR7BuXfOijA5W9QhxSH+y6sCY/BRWmO4KaigpIk=; h=From:To:Cc:Subject:Date:From; b=0QDIc+2WqMb4wBjaJArctJTfLirf/AG+dHWGPm7LXk/zO+EXAQ00HwZhnpU4QYIxj RtSyMdzYuuaz/eJz+e2/wEbbVRJLzMDkFVyXRrn7uGuLzUgZtc2GawldygPZ+DcgN3 wT1zoEtmN22U54tM8ZogXt8CnYQCPpIoAubEToTdncEL4bq9kZITEoqPHcbHXFM1WO 7McxEvFfbj2REAqnJ+7KDCQtV3qpy989IH8JYCO5OtT2QiHnbEAhbCU4aOJaRnFb0U PCtC8keV2W61iGI4EebiMnwFD5+ps6BLabc1xrqjR5kLXGJp8re7nCaupEPP6BzIXr 6ex0/dZQUN9PA== X-Nifty-SrcIP: [122.131.185.176] From: Masahiro Yamada To: u-boot@lists.denx.de Date: Mon, 17 Jul 2017 12:18:39 +0900 Message-Id: <1500261519-4743-1-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 Subject: [U-Boot] [PATCH] dm: ofnode: change return type of dev_read_prop() to opaque pointer X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" DT property values can be strings as well as integers. This is why of_get_property/fdt_getprop returns an opaque pointer. Signed-off-by: Masahiro Yamada Acked-by: Simon Glass Acked-by: Simon Glass --- drivers/core/read.c | 2 +- include/dm/read.h | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/core/read.c b/drivers/core/read.c index eafe727f0373..85705836938c 100644 --- a/drivers/core/read.c +++ b/drivers/core/read.c @@ -114,7 +114,7 @@ int dev_read_phandle(struct udevice *dev) return fdt_get_phandle(gd->fdt_blob, ofnode_to_offset(node)); } -const u32 *dev_read_prop(struct udevice *dev, const char *propname, int *lenp) +const void *dev_read_prop(struct udevice *dev, const char *propname, int *lenp) { return ofnode_get_property(dev_ofnode(dev), propname, lenp); } diff --git a/include/dm/read.h b/include/dm/read.h index b86a2f5feceb..edf468fdd195 100644 --- a/include/dm/read.h +++ b/include/dm/read.h @@ -266,7 +266,7 @@ int dev_read_phandle(struct udevice *dev); * @lenp: place to put length on success * @return pointer to property, or NULL if not found */ -const u32 *dev_read_prop(struct udevice *dev, const char *propname, int *lenp); +const void *dev_read_prop(struct udevice *dev, const char *propname, int *lenp); /** * dev_read_alias_seq() - Get the alias sequence number of a node @@ -443,8 +443,8 @@ static inline int dev_read_phandle(struct udevice *dev) return fdt_get_phandle(gd->fdt_blob, dev_of_offset(dev)); } -static inline const u32 *dev_read_prop(struct udevice *dev, - const char *propname, int *lenp) +static inline const void *dev_read_prop(struct udevice *dev, + const char *propname, int *lenp) { return ofnode_get_property(dev_ofnode(dev), propname, lenp); }