diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2015-11-30 17:11:31 +0200 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2015-12-07 02:29:22 +0100 |
commit | 318a1971826103ecf560875b17236dd4a93e8c88 (patch) | |
tree | de4e8889a9f61b4bcec98ba4e01ba0ab038eb8f6 /include/linux/property.h | |
parent | 61f5e294b89a90e8520c9eaf9a4af787db8911ea (diff) |
device property: refactor built-in properties support
Instead of using the type and nval fields we will use length (in bytes) of the
value. The sanity check is done in the accessors.
The built-in property accessors are split in the same way such as device tree.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'include/linux/property.h')
-rw-r--r-- | include/linux/property.h | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/include/linux/property.h b/include/linux/property.h index 0a3705a7c9f2..c29460a0e521 100644 --- a/include/linux/property.h +++ b/include/linux/property.h @@ -144,14 +144,12 @@ static inline int fwnode_property_read_u64(struct fwnode_handle *fwnode, /** * struct property_entry - "Built-in" device property representation. * @name: Name of the property. - * @type: Type of the property. - * @nval: Number of items of type @type making up the value. - * @value: Value of the property (an array of @nval items of type @type). + * @length: Length of data making up the value. + * @value: Value of the property (an array of items of the given type). */ struct property_entry { const char *name; - enum dev_prop_type type; - size_t nval; + size_t length; union { void *raw_data; u8 *u8_data; |