diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2015-11-30 10:11:31 -0500 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2015-12-06 20:29:22 -0500 |
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, | |||
144 | /** | 144 | /** |
145 | * struct property_entry - "Built-in" device property representation. | 145 | * struct property_entry - "Built-in" device property representation. |
146 | * @name: Name of the property. | 146 | * @name: Name of the property. |
147 | * @type: Type of the property. | 147 | * @length: Length of data making up the value. |
148 | * @nval: Number of items of type @type making up the value. | 148 | * @value: Value of the property (an array of items of the given type). |
149 | * @value: Value of the property (an array of @nval items of type @type). | ||
150 | */ | 149 | */ |
151 | struct property_entry { | 150 | struct property_entry { |
152 | const char *name; | 151 | const char *name; |
153 | enum dev_prop_type type; | 152 | size_t length; |
154 | size_t nval; | ||
155 | union { | 153 | union { |
156 | void *raw_data; | 154 | void *raw_data; |
157 | u8 *u8_data; | 155 | u8 *u8_data; |