Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'acpi-5.20-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull more ACPI updates from Rafael Wysocki:
"These fix up direct references to the fwnode field in struct device
and extend ACPI device properties support.

Specifics:

- Replace direct references to the fwnode field in struct device with
dev_fwnode() and device_match_fwnode() (Andy Shevchenko)

- Make the ACPI code handling device properties support properties
with buffer values (Sakari Ailus)"

* tag 'acpi-5.20-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
ACPI: property: Fix error handling in acpi_init_properties()
ACPI: VIOT: Do not dereference fwnode in struct device
ACPI: property: Read buffer properties as integers
ACPI: property: Add support for parsing buffer property UUID
ACPI: property: Unify integer value reading functions
ACPI: property: Switch node property referencing from ifs to a switch
ACPI: property: Move property ref argument parsing into a new function
ACPI: property: Use acpi_object_type consistently in property ref parsing
ACPI: property: Tie data nodes to acpi handles
ACPI: property: Return type of acpi_add_nondev_subnodes() should be bool

+322 -155
+316 -150
drivers/acpi/property.c
··· 55 55 GUID_INIT(0xdbb8e3e6, 0x5886, 0x4ba6, 56 56 0x87, 0x95, 0x13, 0x19, 0xf5, 0x2a, 0x96, 0x6b); 57 57 58 + static const guid_t buffer_prop_guid = 59 + GUID_INIT(0xedb12dd0, 0x363d, 0x4085, 60 + 0xa3, 0xd2, 0x49, 0x52, 0x2c, 0xa1, 0x60, 0xc4); 61 + 58 62 static bool acpi_enumerate_nondev_subnodes(acpi_handle scope, 59 - const union acpi_object *desc, 63 + union acpi_object *desc, 60 64 struct acpi_device_data *data, 61 65 struct fwnode_handle *parent); 62 - static bool acpi_extract_properties(const union acpi_object *desc, 66 + static bool acpi_extract_properties(acpi_handle handle, 67 + union acpi_object *desc, 63 68 struct acpi_device_data *data); 64 69 65 - static bool acpi_nondev_subnode_extract(const union acpi_object *desc, 70 + static bool acpi_nondev_subnode_extract(union acpi_object *desc, 66 71 acpi_handle handle, 67 72 const union acpi_object *link, 68 73 struct list_head *list, ··· 86 81 INIT_LIST_HEAD(&dn->data.properties); 87 82 INIT_LIST_HEAD(&dn->data.subnodes); 88 83 89 - result = acpi_extract_properties(desc, &dn->data); 84 + result = acpi_extract_properties(handle, desc, &dn->data); 90 85 91 86 if (handle) { 92 87 acpi_handle scope; ··· 160 155 return acpi_nondev_subnode_data_ok(handle, link, list, parent); 161 156 } 162 157 163 - static int acpi_add_nondev_subnodes(acpi_handle scope, 164 - const union acpi_object *links, 165 - struct list_head *list, 166 - struct fwnode_handle *parent) 158 + static bool acpi_add_nondev_subnodes(acpi_handle scope, 159 + union acpi_object *links, 160 + struct list_head *list, 161 + struct fwnode_handle *parent) 167 162 { 168 163 bool ret = false; 169 164 int i; 170 165 171 166 for (i = 0; i < links->package.count; i++) { 172 - const union acpi_object *link, *desc; 167 + union acpi_object *link, *desc; 173 168 acpi_handle handle; 174 169 bool result; 175 170 ··· 209 204 } 210 205 211 206 static bool acpi_enumerate_nondev_subnodes(acpi_handle scope, 212 - const union acpi_object *desc, 207 + union acpi_object *desc, 213 208 struct acpi_device_data *data, 214 209 struct fwnode_handle *parent) 215 210 { ··· 217 212 218 213 /* Look for the ACPI data subnodes GUID. */ 219 214 for (i = 0; i < desc->package.count; i += 2) { 220 - const union acpi_object *guid, *links; 215 + const union acpi_object *guid; 216 + union acpi_object *links; 221 217 222 218 guid = &desc->package.elements[i]; 223 219 links = &desc->package.elements[i + 1]; ··· 331 325 332 326 struct acpi_device_properties * 333 327 acpi_data_add_props(struct acpi_device_data *data, const guid_t *guid, 334 - const union acpi_object *properties) 328 + union acpi_object *properties) 335 329 { 336 330 struct acpi_device_properties *props; 337 331 ··· 346 340 return props; 347 341 } 348 342 349 - static bool acpi_extract_properties(const union acpi_object *desc, 343 + static void acpi_nondev_subnode_tag(acpi_handle handle, void *context) 344 + { 345 + } 346 + 347 + static void acpi_untie_nondev_subnodes(struct acpi_device_data *data) 348 + { 349 + struct acpi_data_node *dn; 350 + 351 + list_for_each_entry(dn, &data->subnodes, sibling) { 352 + acpi_detach_data(dn->handle, acpi_nondev_subnode_tag); 353 + 354 + acpi_untie_nondev_subnodes(&dn->data); 355 + } 356 + } 357 + 358 + static bool acpi_tie_nondev_subnodes(struct acpi_device_data *data) 359 + { 360 + struct acpi_data_node *dn; 361 + 362 + list_for_each_entry(dn, &data->subnodes, sibling) { 363 + acpi_status status; 364 + bool ret; 365 + 366 + status = acpi_attach_data(dn->handle, acpi_nondev_subnode_tag, dn); 367 + if (ACPI_FAILURE(status)) { 368 + acpi_handle_err(dn->handle, "Can't tag data node\n"); 369 + return false; 370 + } 371 + 372 + ret = acpi_tie_nondev_subnodes(&dn->data); 373 + if (!ret) 374 + return ret; 375 + } 376 + 377 + return true; 378 + } 379 + 380 + static void acpi_data_add_buffer_props(acpi_handle handle, 381 + struct acpi_device_data *data, 382 + union acpi_object *properties) 383 + { 384 + struct acpi_device_properties *props; 385 + union acpi_object *package; 386 + size_t alloc_size; 387 + unsigned int i; 388 + u32 *count; 389 + 390 + if (check_mul_overflow((size_t)properties->package.count, 391 + sizeof(*package) + sizeof(void *), 392 + &alloc_size) || 393 + check_add_overflow(sizeof(*props) + sizeof(*package), alloc_size, 394 + &alloc_size)) { 395 + acpi_handle_warn(handle, 396 + "can't allocate memory for %u buffer props", 397 + properties->package.count); 398 + return; 399 + } 400 + 401 + props = kvzalloc(alloc_size, GFP_KERNEL); 402 + if (!props) 403 + return; 404 + 405 + props->guid = &buffer_prop_guid; 406 + props->bufs = (void *)(props + 1); 407 + props->properties = (void *)(props->bufs + properties->package.count); 408 + 409 + /* Outer package */ 410 + package = props->properties; 411 + package->type = ACPI_TYPE_PACKAGE; 412 + package->package.elements = package + 1; 413 + count = &package->package.count; 414 + *count = 0; 415 + 416 + /* Inner packages */ 417 + package++; 418 + 419 + for (i = 0; i < properties->package.count; i++) { 420 + struct acpi_buffer buf = { ACPI_ALLOCATE_BUFFER }; 421 + union acpi_object *property = &properties->package.elements[i]; 422 + union acpi_object *prop, *obj, *buf_obj; 423 + acpi_status status; 424 + 425 + if (property->type != ACPI_TYPE_PACKAGE || 426 + property->package.count != 2) { 427 + acpi_handle_warn(handle, 428 + "buffer property %u has %u entries\n", 429 + i, property->package.count); 430 + continue; 431 + } 432 + 433 + prop = &property->package.elements[0]; 434 + obj = &property->package.elements[1]; 435 + 436 + if (prop->type != ACPI_TYPE_STRING || 437 + obj->type != ACPI_TYPE_STRING) { 438 + acpi_handle_warn(handle, 439 + "wrong object types %u and %u\n", 440 + prop->type, obj->type); 441 + continue; 442 + } 443 + 444 + status = acpi_evaluate_object_typed(handle, obj->string.pointer, 445 + NULL, &buf, 446 + ACPI_TYPE_BUFFER); 447 + if (ACPI_FAILURE(status)) { 448 + acpi_handle_warn(handle, 449 + "can't evaluate \"%*pE\" as buffer\n", 450 + obj->string.length, 451 + obj->string.pointer); 452 + continue; 453 + } 454 + 455 + package->type = ACPI_TYPE_PACKAGE; 456 + package->package.elements = prop; 457 + package->package.count = 2; 458 + 459 + buf_obj = buf.pointer; 460 + 461 + /* Replace the string object with a buffer object */ 462 + obj->type = ACPI_TYPE_BUFFER; 463 + obj->buffer.length = buf_obj->buffer.length; 464 + obj->buffer.pointer = buf_obj->buffer.pointer; 465 + 466 + props->bufs[i] = buf.pointer; 467 + package++; 468 + (*count)++; 469 + } 470 + 471 + if (*count) 472 + list_add(&props->list, &data->properties); 473 + else 474 + kvfree(props); 475 + } 476 + 477 + static bool acpi_extract_properties(acpi_handle scope, union acpi_object *desc, 350 478 struct acpi_device_data *data) 351 479 { 352 480 int i; ··· 490 350 491 351 /* Look for the device properties GUID. */ 492 352 for (i = 0; i < desc->package.count; i += 2) { 493 - const union acpi_object *guid, *properties; 353 + const union acpi_object *guid; 354 + union acpi_object *properties; 494 355 495 356 guid = &desc->package.elements[i]; 496 357 properties = &desc->package.elements[i + 1]; ··· 504 363 guid->buffer.length != 16 || 505 364 properties->type != ACPI_TYPE_PACKAGE) 506 365 break; 366 + 367 + if (guid_equal((guid_t *)guid->buffer.pointer, 368 + &buffer_prop_guid)) { 369 + acpi_data_add_buffer_props(scope, data, properties); 370 + continue; 371 + } 507 372 508 373 if (!acpi_is_property_guid((guid_t *)guid->buffer.pointer)) 509 374 continue; ··· 557 410 if (ACPI_FAILURE(status)) 558 411 goto out; 559 412 560 - if (acpi_extract_properties(buf.pointer, &adev->data)) { 413 + if (acpi_extract_properties(adev->handle, buf.pointer, &adev->data)) { 561 414 adev->data.pointer = buf.pointer; 562 415 if (acpi_of) 563 416 acpi_init_of_compatible(adev); ··· 569 422 if (!adev->data.pointer) { 570 423 acpi_handle_debug(adev->handle, "Invalid _DSD data, skipping\n"); 571 424 ACPI_FREE(buf.pointer); 425 + } else { 426 + if (!acpi_tie_nondev_subnodes(&adev->data)) 427 + acpi_untie_nondev_subnodes(&adev->data); 572 428 } 573 429 574 430 out: ··· 588 438 struct acpi_device_properties *props, *tmp; 589 439 590 440 list_for_each_entry_safe(props, tmp, list, list) { 441 + u32 i; 442 + 591 443 list_del(&props->list); 592 - kfree(props); 444 + /* Buffer data properties were separately allocated */ 445 + if (props->bufs) 446 + for (i = 0; i < props->properties->package.count; i++) 447 + ACPI_FREE(props->bufs[i]); 448 + kvfree(props); 593 449 } 594 450 } 595 451 ··· 618 462 619 463 void acpi_free_properties(struct acpi_device *adev) 620 464 { 465 + acpi_untie_nondev_subnodes(&adev->data); 621 466 acpi_destroy_nondev_subnodes(&adev->data.subnodes); 622 467 ACPI_FREE((void *)adev->data.pointer); 623 468 adev->data.of_compatible = NULL; ··· 790 633 return NULL; 791 634 } 792 635 636 + static int acpi_get_ref_args(struct fwnode_reference_args *args, 637 + struct fwnode_handle *ref_fwnode, 638 + const union acpi_object **element, 639 + const union acpi_object *end, size_t num_args) 640 + { 641 + u32 nargs = 0, i; 642 + 643 + /* 644 + * Find the referred data extension node under the 645 + * referred device node. 646 + */ 647 + for (; *element < end && (*element)->type == ACPI_TYPE_STRING; 648 + (*element)++) { 649 + const char *child_name = (*element)->string.pointer; 650 + 651 + ref_fwnode = acpi_fwnode_get_named_child_node(ref_fwnode, child_name); 652 + if (!ref_fwnode) 653 + return -EINVAL; 654 + } 655 + 656 + /* 657 + * Assume the following integer elements are all args. Stop counting on 658 + * the first reference or end of the package arguments. In case of 659 + * neither reference, nor integer, return an error, we can't parse it. 660 + */ 661 + for (i = 0; (*element) + i < end && i < num_args; i++) { 662 + acpi_object_type type = (*element)[i].type; 663 + 664 + if (type == ACPI_TYPE_LOCAL_REFERENCE) 665 + break; 666 + 667 + if (type == ACPI_TYPE_INTEGER) 668 + nargs++; 669 + else 670 + return -EINVAL; 671 + } 672 + 673 + if (nargs > NR_FWNODE_REFERENCE_ARGS) 674 + return -EINVAL; 675 + 676 + if (args) { 677 + args->fwnode = ref_fwnode; 678 + args->nargs = nargs; 679 + for (i = 0; i < nargs; i++) 680 + args->args[i] = (*element)[i].integer.value; 681 + } 682 + 683 + (*element) += nargs; 684 + 685 + return 0; 686 + } 687 + 793 688 /** 794 689 * __acpi_node_get_property_reference - returns handle to the referenced object 795 690 * @fwnode: Firmware node to get the property from ··· 895 686 if (ret) 896 687 return ret == -EINVAL ? -ENOENT : -EINVAL; 897 688 898 - /* 899 - * The simplest case is when the value is a single reference. Just 900 - * return that reference then. 901 - */ 902 - if (obj->type == ACPI_TYPE_LOCAL_REFERENCE) { 689 + switch (obj->type) { 690 + case ACPI_TYPE_LOCAL_REFERENCE: 691 + /* Plain single reference without arguments. */ 903 692 if (index) 904 693 return -ENOENT; 905 694 ··· 908 701 args->fwnode = acpi_fwnode_handle(device); 909 702 args->nargs = 0; 910 703 return 0; 704 + case ACPI_TYPE_PACKAGE: 705 + /* 706 + * If it is not a single reference, then it is a package of 707 + * references followed by number of ints as follows: 708 + * 709 + * Package () { REF, INT, REF, INT, INT } 710 + * 711 + * The index argument is then used to determine which reference 712 + * the caller wants (along with the arguments). 713 + */ 714 + break; 715 + default: 716 + return -EINVAL; 911 717 } 912 718 913 - /* 914 - * If it is not a single reference, then it is a package of 915 - * references followed by number of ints as follows: 916 - * 917 - * Package () { REF, INT, REF, INT, INT } 918 - * 919 - * The index argument is then used to determine which reference 920 - * the caller wants (along with the arguments). 921 - */ 922 - if (obj->type != ACPI_TYPE_PACKAGE) 923 - return -EINVAL; 924 719 if (index >= obj->package.count) 925 720 return -ENOENT; 926 721 ··· 930 721 end = element + obj->package.count; 931 722 932 723 while (element < end) { 933 - u32 nargs, i; 934 - 935 - if (element->type == ACPI_TYPE_LOCAL_REFERENCE) { 936 - struct fwnode_handle *ref_fwnode; 937 - 724 + switch (element->type) { 725 + case ACPI_TYPE_LOCAL_REFERENCE: 938 726 device = acpi_fetch_acpi_dev(element->reference.handle); 939 727 if (!device) 940 728 return -EINVAL; 941 729 942 - nargs = 0; 943 730 element++; 944 731 945 - /* 946 - * Find the referred data extension node under the 947 - * referred device node. 948 - */ 949 - for (ref_fwnode = acpi_fwnode_handle(device); 950 - element < end && element->type == ACPI_TYPE_STRING; 951 - element++) { 952 - ref_fwnode = acpi_fwnode_get_named_child_node( 953 - ref_fwnode, element->string.pointer); 954 - if (!ref_fwnode) 955 - return -EINVAL; 956 - } 732 + ret = acpi_get_ref_args(idx == index ? args : NULL, 733 + acpi_fwnode_handle(device), 734 + &element, end, num_args); 735 + if (ret < 0) 736 + return ret; 957 737 958 - /* 959 - * Assume the following integer elements are all args. 960 - * Stop counting on the first reference or end of the 961 - * package arguments. In case of neither reference, 962 - * nor integer, return an error, we can't parse it. 963 - */ 964 - for (i = 0; element + i < end && i < num_args; i++) { 965 - int type = element[i].type; 966 - 967 - if (type == ACPI_TYPE_LOCAL_REFERENCE) 968 - break; 969 - if (type == ACPI_TYPE_INTEGER) 970 - nargs++; 971 - else 972 - return -EINVAL; 973 - } 974 - 975 - if (nargs > NR_FWNODE_REFERENCE_ARGS) 976 - return -EINVAL; 977 - 978 - if (idx == index) { 979 - args->fwnode = ref_fwnode; 980 - args->nargs = nargs; 981 - for (i = 0; i < nargs; i++) 982 - args->args[i] = element[i].integer.value; 983 - 738 + if (idx == index) 984 739 return 0; 985 - } 986 740 987 - element += nargs; 988 - } else if (element->type == ACPI_TYPE_INTEGER) { 741 + break; 742 + case ACPI_TYPE_INTEGER: 989 743 if (idx == index) 990 744 return -ENOENT; 991 745 element++; 992 - } else { 746 + break; 747 + default: 993 748 return -EINVAL; 994 749 } 995 750 ··· 1025 852 return ret; 1026 853 } 1027 854 1028 - static int acpi_copy_property_array_u8(const union acpi_object *items, u8 *val, 1029 - size_t nval) 1030 - { 1031 - int i; 1032 - 1033 - for (i = 0; i < nval; i++) { 1034 - if (items[i].type != ACPI_TYPE_INTEGER) 1035 - return -EPROTO; 1036 - if (items[i].integer.value > U8_MAX) 1037 - return -EOVERFLOW; 1038 - 1039 - val[i] = items[i].integer.value; 1040 - } 1041 - return 0; 1042 - } 1043 - 1044 - static int acpi_copy_property_array_u16(const union acpi_object *items, 1045 - u16 *val, size_t nval) 1046 - { 1047 - int i; 1048 - 1049 - for (i = 0; i < nval; i++) { 1050 - if (items[i].type != ACPI_TYPE_INTEGER) 1051 - return -EPROTO; 1052 - if (items[i].integer.value > U16_MAX) 1053 - return -EOVERFLOW; 1054 - 1055 - val[i] = items[i].integer.value; 1056 - } 1057 - return 0; 1058 - } 1059 - 1060 - static int acpi_copy_property_array_u32(const union acpi_object *items, 1061 - u32 *val, size_t nval) 1062 - { 1063 - int i; 1064 - 1065 - for (i = 0; i < nval; i++) { 1066 - if (items[i].type != ACPI_TYPE_INTEGER) 1067 - return -EPROTO; 1068 - if (items[i].integer.value > U32_MAX) 1069 - return -EOVERFLOW; 1070 - 1071 - val[i] = items[i].integer.value; 1072 - } 1073 - return 0; 1074 - } 1075 - 1076 - static int acpi_copy_property_array_u64(const union acpi_object *items, 1077 - u64 *val, size_t nval) 1078 - { 1079 - int i; 1080 - 1081 - for (i = 0; i < nval; i++) { 1082 - if (items[i].type != ACPI_TYPE_INTEGER) 1083 - return -EPROTO; 1084 - 1085 - val[i] = items[i].integer.value; 1086 - } 1087 - return 0; 1088 - } 855 + #define acpi_copy_property_array_uint(items, val, nval) \ 856 + ({ \ 857 + typeof(items) __items = items; \ 858 + typeof(val) __val = val; \ 859 + typeof(nval) __nval = nval; \ 860 + size_t i; \ 861 + int ret = 0; \ 862 + \ 863 + for (i = 0; i < __nval; i++) { \ 864 + if (__items->type == ACPI_TYPE_BUFFER) { \ 865 + __val[i] = __items->buffer.pointer[i]; \ 866 + continue; \ 867 + } \ 868 + if (__items[i].type != ACPI_TYPE_INTEGER) { \ 869 + ret = -EPROTO; \ 870 + break; \ 871 + } \ 872 + if (__items[i].integer.value > _Generic(__val, \ 873 + u8: U8_MAX, \ 874 + u16: U16_MAX, \ 875 + u32: U32_MAX, \ 876 + u64: U64_MAX, \ 877 + default: 0U)) { \ 878 + ret = -EOVERFLOW; \ 879 + break; \ 880 + } \ 881 + \ 882 + __val[i] = __items[i].integer.value; \ 883 + } \ 884 + ret; \ 885 + }) 1089 886 1090 887 static int acpi_copy_property_array_string(const union acpi_object *items, 1091 888 char **val, size_t nval) ··· 1097 954 } 1098 955 1099 956 ret = acpi_data_get_property_array(data, propname, ACPI_TYPE_ANY, &obj); 957 + if (ret && proptype >= DEV_PROP_U8 && proptype <= DEV_PROP_U64) 958 + ret = acpi_data_get_property(data, propname, ACPI_TYPE_BUFFER, 959 + &obj); 1100 960 if (ret) 1101 961 return ret; 1102 962 1103 - if (!val) 1104 - return obj->package.count; 963 + if (!val) { 964 + if (obj->type == ACPI_TYPE_BUFFER) 965 + return obj->buffer.length; 1105 966 1106 - if (proptype != DEV_PROP_STRING && nval > obj->package.count) 1107 - return -EOVERFLOW; 967 + return obj->package.count; 968 + } 969 + 970 + switch (proptype) { 971 + case DEV_PROP_STRING: 972 + break; 973 + case DEV_PROP_U8 ... DEV_PROP_U64: 974 + if (obj->type == ACPI_TYPE_BUFFER) { 975 + if (nval > obj->buffer.length) 976 + return -EOVERFLOW; 977 + break; 978 + } 979 + fallthrough; 980 + default: 981 + if (nval > obj->package.count) 982 + return -EOVERFLOW; 983 + break; 984 + } 1108 985 if (nval == 0) 1109 986 return -EINVAL; 1110 987 1111 - items = obj->package.elements; 988 + if (obj->type != ACPI_TYPE_BUFFER) 989 + items = obj->package.elements; 990 + else 991 + items = obj; 1112 992 1113 993 switch (proptype) { 1114 994 case DEV_PROP_U8: 1115 - ret = acpi_copy_property_array_u8(items, (u8 *)val, nval); 995 + ret = acpi_copy_property_array_uint(items, (u8 *)val, nval); 1116 996 break; 1117 997 case DEV_PROP_U16: 1118 - ret = acpi_copy_property_array_u16(items, (u16 *)val, nval); 998 + ret = acpi_copy_property_array_uint(items, (u16 *)val, nval); 1119 999 break; 1120 1000 case DEV_PROP_U32: 1121 - ret = acpi_copy_property_array_u32(items, (u32 *)val, nval); 1001 + ret = acpi_copy_property_array_uint(items, (u32 *)val, nval); 1122 1002 break; 1123 1003 case DEV_PROP_U64: 1124 - ret = acpi_copy_property_array_u64(items, (u64 *)val, nval); 1004 + ret = acpi_copy_property_array_uint(items, (u64 *)val, nval); 1125 1005 break; 1126 1006 case DEV_PROP_STRING: 1127 1007 ret = acpi_copy_property_array_string(
+3 -3
drivers/acpi/viot.c
··· 88 88 return -ENODEV; 89 89 } 90 90 91 - fwnode = pdev->dev.fwnode; 91 + fwnode = dev_fwnode(&pdev->dev); 92 92 if (!fwnode) { 93 93 /* 94 94 * PCI devices aren't necessarily described by ACPI. Create a ··· 101 101 } 102 102 set_primary_fwnode(&pdev->dev, fwnode); 103 103 } 104 - viommu->fwnode = pdev->dev.fwnode; 104 + viommu->fwnode = dev_fwnode(&pdev->dev); 105 105 pci_dev_put(pdev); 106 106 return 0; 107 107 } ··· 314 314 return -ENODEV; 315 315 316 316 /* We're not translating ourself */ 317 - if (viommu->fwnode == dev->fwnode) 317 + if (device_match_fwnode(dev, viommu->fwnode)) 318 318 return -EINVAL; 319 319 320 320 ops = iommu_ops_from_fwnode(viommu->fwnode);
+2 -1
include/acpi/acpi_bus.h
··· 344 344 345 345 struct acpi_device_properties { 346 346 const guid_t *guid; 347 - const union acpi_object *properties; 347 + union acpi_object *properties; 348 348 struct list_head list; 349 + void **bufs; 349 350 }; 350 351 351 352 /* ACPI Device Specific Data (_DSD) */
+1 -1
include/linux/acpi.h
··· 1251 1251 1252 1252 struct acpi_device_properties * 1253 1253 acpi_data_add_props(struct acpi_device_data *data, const guid_t *guid, 1254 - const union acpi_object *properties); 1254 + union acpi_object *properties); 1255 1255 1256 1256 int acpi_node_prop_get(const struct fwnode_handle *fwnode, const char *propname, 1257 1257 void **valptr);