Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754281AbbKXKXk (ORCPT ); Tue, 24 Nov 2015 05:23:40 -0500 Received: from mga11.intel.com ([192.55.52.93]:59781 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753798AbbKXKXf (ORCPT ); Tue, 24 Nov 2015 05:23:35 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,338,1444719600"; d="scan'208";a="827848810" From: Andy Shevchenko To: "Rafael J. Wysocki" , Greg Kroah-Hartman , Jarkko Nikula , linux-i2c@vger.kernel.org, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, Lee Jones , Mika Westerberg , Kevin Fenzi , Arnd Bergmann , Wolfram Sang Cc: Andy Shevchenko Subject: [PATCH v1 02/13] device property: rename helper functions Date: Tue, 24 Nov 2015 12:22:48 +0200 Message-Id: <1448360579-79260-3-git-send-email-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.6.2 In-Reply-To: <1448360579-79260-1-git-send-email-andriy.shevchenko@linux.intel.com> References: <1448360579-79260-1-git-send-email-andriy.shevchenko@linux.intel.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3229 Lines: 86 To be in align with the rest of fwnode types we rename the built-in property set ones, i.e. is_pset() -> is_pset_node() to_pset() -> to_pset_node() There is no functional change. Signed-off-by: Andy Shevchenko --- drivers/base/property.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/base/property.c b/drivers/base/property.c index 09e488d..2e01f3f 100644 --- a/drivers/base/property.c +++ b/drivers/base/property.c @@ -37,14 +37,14 @@ void device_add_property_set(struct device *dev, struct property_set *pset) } EXPORT_SYMBOL_GPL(device_add_property_set); -static inline bool is_pset(struct fwnode_handle *fwnode) +static inline bool is_pset_node(struct fwnode_handle *fwnode) { return fwnode && fwnode->type == FWNODE_PDATA; } -static inline struct property_set *to_pset(struct fwnode_handle *fwnode) +static inline struct property_set *to_pset_node(struct fwnode_handle *fwnode) { - return is_pset(fwnode) ? + return is_pset_node(fwnode) ? container_of(fwnode, struct property_set, fwnode) : NULL; } @@ -135,8 +135,8 @@ bool fwnode_property_present(struct fwnode_handle *fwnode, const char *propname) return of_property_read_bool(to_of_node(fwnode), propname); else if (is_acpi_node(fwnode)) return !acpi_node_prop_get(fwnode, propname, NULL); - else if (is_pset(fwnode)) - return !!pset_prop_get(to_pset(fwnode), propname); + else if (is_pset_node(fwnode)) + return !!pset_prop_get(to_pset_node(fwnode), propname); return false; } EXPORT_SYMBOL_GPL(fwnode_property_present); @@ -323,8 +323,8 @@ EXPORT_SYMBOL_GPL(device_property_match_string); else if (is_acpi_node(_fwnode_)) \ _ret_ = acpi_node_prop_read(_fwnode_, _propname_, _proptype_, \ _val_, _nval_); \ - else if (is_pset(_fwnode_)) \ - _ret_ = pset_prop_read_array(to_pset(_fwnode_), _propname_, \ + else if (is_pset_node(_fwnode_)) \ + _ret_ = pset_prop_read_array(to_pset_node(_fwnode_), _propname_, \ _proptype_, _val_, _nval_); \ else \ _ret_ = -ENXIO; \ @@ -465,8 +465,8 @@ int fwnode_property_read_string_array(struct fwnode_handle *fwnode, else if (is_acpi_node(fwnode)) return acpi_node_prop_read(fwnode, propname, DEV_PROP_STRING, val, nval); - else if (is_pset(fwnode)) - return pset_prop_read_array(to_pset(fwnode), propname, + else if (is_pset_node(fwnode)) + return pset_prop_read_array(to_pset_node(fwnode), propname, DEV_PROP_STRING, val, nval); return -ENXIO; } @@ -495,8 +495,8 @@ int fwnode_property_read_string(struct fwnode_handle *fwnode, else if (is_acpi_node(fwnode)) return acpi_node_prop_read(fwnode, propname, DEV_PROP_STRING, val, 1); - else if (is_pset(fwnode)) - return pset_prop_read_array(to_pset(fwnode), propname, + else if (is_pset_node(fwnode)) + return pset_prop_read_array(to_pset_node(fwnode), propname, DEV_PROP_STRING, val, 1); return -ENXIO; } -- 2.6.2 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/