@@ -85,11 +85,9 @@ static void __init unmarshal_key_value_pairs(struct dev_header *dev_header,
ucs2_as_utf8(key, ptr + sizeof(key_len),
key_len - sizeof(key_len));
- entry[i].name = key;
- entry[i].length = val_len - sizeof(val_len);
- entry[i].is_array = !!entry[i].length;
- entry[i].type = DEV_PROP_U8;
- entry[i].pointer.u8_data = ptr + key_len + sizeof(val_len);
+ entry[i] = PROPERTY_ENTRY_U8_ARRAY_LEN(key,
+ ptr + key_len + sizeof(val_len),
+ val_len - sizeof(val_len));
if (dump_properties) {
dev_info(dev, "property: %s\n", entry[i].name);
Let's switch to using PROPERTY_ENTRY_U8_ARRAY_LEN() to initialize property entries instead of poking into the structure directly. Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> --- drivers/firmware/efi/apple-properties.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)