From patchwork Thu Feb 5 18:01:05 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Balbi X-Patchwork-Id: 5786101 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id B76609F336 for ; Thu, 5 Feb 2015 18:01:42 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D76AB20270 for ; Thu, 5 Feb 2015 18:01:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DE2E520253 for ; Thu, 5 Feb 2015 18:01:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752332AbbBESBk (ORCPT ); Thu, 5 Feb 2015 13:01:40 -0500 Received: from arroyo.ext.ti.com ([192.94.94.40]:52637 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751481AbbBESBi (ORCPT ); Thu, 5 Feb 2015 13:01:38 -0500 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id t15I1Dla025692; Thu, 5 Feb 2015 12:01:13 -0600 Received: from DLEE70.ent.ti.com (dlee70.ent.ti.com [157.170.170.113]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id t15I1C8Y007147; Thu, 5 Feb 2015 12:01:12 -0600 Received: from dflp33.itg.ti.com (10.64.6.16) by DLEE70.ent.ti.com (157.170.170.113) with Microsoft SMTP Server id 14.3.224.2; Thu, 5 Feb 2015 12:01:11 -0600 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id t15I1BHB028569; Thu, 5 Feb 2015 12:01:11 -0600 From: Felipe Balbi To: CC: Tony Lindgren , Linux OMAP Mailing List , Linux ARM Kernel Mailing List , Felipe Balbi Subject: [RFC/PATCH 1/2] of: move of_property_read_bool further down Date: Thu, 5 Feb 2015 12:01:05 -0600 Message-ID: <1423159266-25561-1-git-send-email-balbi@ti.com> X-Mailer: git-send-email 2.3.0-rc1 MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_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 A follow-up patch will make use of of_property_read_u32() to allow for boolean properties to have a value, this is just in preparation for that patch in order to make review easier. Signed-off-by: Felipe Balbi --- include/linux/of.h | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/include/linux/of.h b/include/linux/of.h index dfde07e77a63..76c055b20fef 100644 --- a/include/linux/of.h +++ b/include/linux/of.h @@ -765,22 +765,6 @@ static inline int of_property_read_string_index(struct device_node *np, return rc < 0 ? rc : 0; } -/** - * of_property_read_bool - Findfrom a property - * @np: device node from which the property value is to be read. - * @propname: name of the property to be searched. - * - * Search for a property in a device node. - * Returns true if the property exist false otherwise. - */ -static inline bool of_property_read_bool(const struct device_node *np, - const char *propname) -{ - struct property *prop = of_find_property(np, propname, NULL); - - return prop ? true : false; -} - static inline int of_property_read_u8(const struct device_node *np, const char *propname, u8 *out_value) @@ -802,6 +786,22 @@ static inline int of_property_read_u32(const struct device_node *np, return of_property_read_u32_array(np, propname, out_value, 1); } +/** + * of_property_read_bool - Findfrom a property + * @np: device node from which the property value is to be read. + * @propname: name of the property to be searched. + * + * Search for a property in a device node. + * Returns true if the property exist false otherwise. + */ +static inline bool of_property_read_bool(const struct device_node *np, + const char *propname) +{ + struct property *prop = of_find_property(np, propname, NULL); + + return prop ? true : false; +} + static inline int of_property_read_s32(const struct device_node *np, const char *propname, s32 *out_value)