summaryrefslogtreecommitdiffstats
path: root/drivers/base/property.c
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2015-11-30 16:11:34 +0100
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2015-12-07 02:29:23 +0100
commit1d656fb757c17e48a8a01bd576d14918701ba55c (patch)
treed1a1641e9f612af5c62e156b0dc953c4b7c11431 /drivers/base/property.c
parentdevice property: helper macros for property entry creation (diff)
downloadlinux-1d656fb757c17e48a8a01bd576d14918701ba55c.tar.xz
linux-1d656fb757c17e48a8a01bd576d14918701ba55c.zip
device property: improve readability of macros
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>
Diffstat (limited to 'drivers/base/property.c')
-rw-r--r--drivers/base/property.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/drivers/base/property.c b/drivers/base/property.c
index ad3cb0982363..a3538cbdff7e 100644
--- a/drivers/base/property.c
+++ b/drivers/base/property.c
@@ -400,29 +400,29 @@ int device_property_match_string(struct device *dev, const char *propname,
}
EXPORT_SYMBOL_GPL(device_property_match_string);
-#define OF_DEV_PROP_READ_ARRAY(node, propname, type, val, nval) \
- (val) ? of_property_read_##type##_array((node), (propname), (val), (nval)) \
+#define OF_DEV_PROP_READ_ARRAY(node, propname, type, val, nval) \
+ (val) ? of_property_read_##type##_array((node), (propname), (val), (nval)) \
: of_property_count_elems_of_size((node), (propname), sizeof(type))
#define PSET_PROP_READ_ARRAY(node, propname, type, val, nval) \
(val) ? pset_prop_read_##type##_array((node), (propname), (val), (nval)) \
: pset_prop_count_elems_of_size((node), (propname), sizeof(type))
-#define FWNODE_PROP_READ_ARRAY(_fwnode_, _propname_, _type_, _proptype_, _val_, _nval_) \
-({ \
- int _ret_; \
- if (is_of_node(_fwnode_)) \
- _ret_ = OF_DEV_PROP_READ_ARRAY(to_of_node(_fwnode_), _propname_, \
- _type_, _val_, _nval_); \
- else if (is_acpi_node(_fwnode_)) \
- _ret_ = acpi_node_prop_read(_fwnode_, _propname_, _proptype_, \
- _val_, _nval_); \
+#define FWNODE_PROP_READ_ARRAY(_fwnode_, _propname_, _type_, _proptype_, _val_, _nval_) \
+({ \
+ int _ret_; \
+ if (is_of_node(_fwnode_)) \
+ _ret_ = OF_DEV_PROP_READ_ARRAY(to_of_node(_fwnode_), _propname_, \
+ _type_, _val_, _nval_); \
+ else if (is_acpi_node(_fwnode_)) \
+ _ret_ = acpi_node_prop_read(_fwnode_, _propname_, _proptype_, \
+ _val_, _nval_); \
else if (is_pset_node(_fwnode_)) \
_ret_ = PSET_PROP_READ_ARRAY(to_pset_node(_fwnode_), _propname_, \
_type_, _val_, _nval_); \
- else \
- _ret_ = -ENXIO; \
- _ret_; \
+ else \
+ _ret_ = -ENXIO; \
+ _ret_; \
})
/**