From patchwork Thu Jun 22 07:54:06 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 106185 Delivered-To: patch@linaro.org Received: by 10.140.91.2 with SMTP id y2csp2331456qgd; Thu, 22 Jun 2017 00:55:39 -0700 (PDT) X-Received: by 10.80.166.101 with SMTP id d92mr1609671edc.132.1498118139627; Thu, 22 Jun 2017 00:55:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1498118139; cv=none; d=google.com; s=arc-20160816; b=SejFuhi5fMU2rwH8/fft4qbXNYS5MMDfrIeIA0ZG2sE23YhCtk4j3VkOF0xG8vxpG/ Etx5QSkmklN/btWkwiO6rKVzcPXuMhfRSTbG7+QuzYcwPNksMxfCNRPbFyVAeoB6OZP7 vOkcxgoJk/6AhuVqSZuki6ag4gMvNpuq1A7rqYa0octfYjgsmq4o7nddRBk1pi8SzsjQ pLFYsixz3BDZ82SIRB1eBb8qxif06uyJAdaXTW6SpONi4JDByNxfLwbLDMbHnjX5oVZH AdSURQcPTEb4CaDvQx7NBB6Pyq7+0umrm1ALRrZB7adoAAv4fHZL/nR9PklA0zOIlYLr aQeA== 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:references:in-reply-to:message-id:date :to:from:dkim-signature:dkim-filter:arc-authentication-results; bh=gdl1HRsnszr+orr5JhmhtyMhsBYF4ChY5DeO2KZNPwY=; b=q9i4J0bNK20tnnPJsimXdObvV3C/1Ckc8JIjMGsj6jgtQBLhUxQZtEUY2bWu2NPOFF ZookC0H0jo7fW8k83XRLYhxevnjdB9PVRXT36FlKlRA1GfN5ABz1FNJbkJ7ecTwZXi9Y D0bP7HZVmYAg12IpQ33khb+2JxPtDx3XPKNGZ/0kxYY2j1rB/JclIIgR5/ytBCpAnP9p sFkG/dwGW8yZIHOhI26uZek7dU52MMcBBqQmu75vvedZ6/DDBpqFvl7lIXW/gmbf32w8 eWxNaQVk2dXTim6QJVTPNfbCx3R1g8sblyfw1PHRI88NTPmHVQFbUf4xpPs8W1dU6mgH qb4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@nifty.com header.b=a62wJnsV; 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 e11si1008900edc.142.2017.06.22.00.55.39; Thu, 22 Jun 2017 00:55:39 -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=a62wJnsV; 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 37E71C21CC2; Thu, 22 Jun 2017 07:54:53 +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 52290C21C77; Thu, 22 Jun 2017 07:54:36 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 207E3C21C63; Thu, 22 Jun 2017 07:54:34 +0000 (UTC) Received: from conuserg-10.nifty.com (conuserg-10.nifty.com [210.131.2.77]) by lists.denx.de (Postfix) with ESMTPS id 408B4C21C66 for ; Thu, 22 Jun 2017 07:54:32 +0000 (UTC) Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-10.nifty.com with ESMTP id v5M7s9k8009287; Thu, 22 Jun 2017 16:54:11 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-10.nifty.com v5M7s9k8009287 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1498118051; bh=jOUG+1yZLAKAilMKziqXMx93zo7VFTxzZ8tqmvDKcaE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=a62wJnsVvvMLdH/bDRONby6mufZCUkuuJhiunLLXTDz2JBKtqhnHr2ngg85OuXZU6 Q+KzQQvWI8Y0IKVNfRDnyGKjPrk4lQxatTKx53fIDoXCzKfhQZ71nAY7TAR5gl7zAO gKlmxoev5bZ/9r7jIa3Y0yTrnxmOL7GNs9s8hmfSxBuWfLS8JYyObzTUhAIXuNtYSy fL2UKUCa6m0+nosLqBfJbyCsizPzcwm/sRtSFyh2+qBbqzzbUnV0eOUylBBce2DHgY 6tZuahMS4pxj3mBEn5JJVdCaU5YTgPEBou0jIH9JuV3qaCi9Cp0jYAfkRkoNw/7ieB LoCBn8EpWDVwQ== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: u-boot@lists.denx.de Date: Thu, 22 Jun 2017 16:54:06 +0900 Message-Id: <1498118047-11918-4-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1498118047-11918-1-git-send-email-yamada.masahiro@socionext.com> References: <1498118047-11918-1-git-send-email-yamada.masahiro@socionext.com> Subject: [U-Boot] [PATCH 4/5] dm: ofnode: rename dev_read_prop() to dev_get_property() 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" The previous commit renamed ofnode_read_prop() to ofnode_get_propery() and fixed its return type. Likewise, rename dev_read_prop() and fix its return type. Signed-off-by: Masahiro Yamada Acked-by: Simon Glass --- drivers/core/read.c | 3 ++- drivers/input/key_matrix.c | 4 ++-- include/dm/read.h | 9 +++++---- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/drivers/core/read.c b/drivers/core/read.c index c1fe949808fa..61fda9334a7c 100644 --- a/drivers/core/read.c +++ b/drivers/core/read.c @@ -104,7 +104,8 @@ 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_get_property(struct udevice *dev, const char *propname, + int *lenp) { return ofnode_get_property(dev_ofnode(dev), propname, lenp); } diff --git a/drivers/input/key_matrix.c b/drivers/input/key_matrix.c index cd5bce361356..3669019cb9ff 100644 --- a/drivers/input/key_matrix.c +++ b/drivers/input/key_matrix.c @@ -144,7 +144,7 @@ int key_matrix_decode_fdt(struct udevice *dev, struct key_matrix *config) int proplen; uchar *plain_keycode; - prop = dev_read_prop(dev, "linux,keymap", &proplen); + prop = dev_get_property(dev, "linux,keymap", &proplen); /* Basic keymap is required */ if (!prop) { debug("%s: cannot find keycode-plain map\n", __func__); @@ -158,7 +158,7 @@ int key_matrix_decode_fdt(struct udevice *dev, struct key_matrix *config) if (!config->plain_keycode) return -1; - prop = dev_read_prop(dev, "linux,fn-keymap", &proplen); + prop = dev_get_property(dev, "linux,fn-keymap", &proplen); /* fn keymap is optional */ if (!prop) goto done; diff --git a/include/dm/read.h b/include/dm/read.h index 562881962a64..74d5490ad2ce 100644 --- a/include/dm/read.h +++ b/include/dm/read.h @@ -227,14 +227,15 @@ int dev_read_size_cells(struct udevice *dev); int dev_read_phandle(struct udevice *dev); /** - * dev_read_prop()- - read a property from a device's node + * dev_get_property()- - get a pointer to the value of a device's node * * @dev: device to check * @propname: property to read * @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_get_property(struct udevice *dev, const char *propname, + int *lenp); /** * dev_read_alias_seq() - Get the alias sequence number of a node @@ -386,8 +387,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_get_property(struct udevice *dev, + const char *propname, int *lenp) { return ofnode_get_property(dev_ofnode(dev), propname, lenp); }