Skip to content

Commit

Permalink
device property: rename helper functions
Browse files Browse the repository at this point in the history
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 <andriy.shevchenko@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
  • Loading branch information
Andy Shevchenko authored and Rafael J. Wysocki committed Dec 7, 2015
1 parent e3f9e29 commit 61f5e29
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions drivers/base/property.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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; \
Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit 61f5e29

Please sign in to comment.