mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
ACPI / osl: Remove acpi_get_table_with_size()/early_acpi_os_unmap_memory() users
This patch removes the users of the deprectated APIs: acpi_get_table_with_size() early_acpi_os_unmap_memory() The following APIs should be used instead of: acpi_get_table() acpi_put_table() The deprecated APIs are invented to be a replacement of acpi_get_table() during the early stage so that the early mapped pointer will not be stored in ACPICA core and thus the late stage acpi_get_table() won't return a wrong pointer. The mapping size is returned just because it is required by early_acpi_os_unmap_memory() to unmap the pointer during early stage. But as the mapping size equals to the acpi_table_header.length (see acpi_tb_init_table_descriptor() and acpi_tb_validate_table()), when such a convenient result is returned, driver code will start to use it instead of accessing acpi_table_header to obtain the length. Thus this patch cleans up the drivers by replacing returned table size with acpi_table_header.length, and should be a no-op. Reported-by: Dan Williams <[email protected]> Signed-off-by: Lv Zheng <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
This commit is contained in:
parent
66360faa43
commit
6b11d1d677
10 changed files with 29 additions and 42 deletions
|
|
@ -446,7 +446,6 @@ static int pcc_parse_subspace_irq(int id,
|
|||
*/
|
||||
static int __init acpi_pcc_probe(void)
|
||||
{
|
||||
acpi_size pcct_tbl_header_size;
|
||||
struct acpi_table_header *pcct_tbl;
|
||||
struct acpi_subtable_header *pcct_entry;
|
||||
struct acpi_table_pcct *acpi_pcct_tbl;
|
||||
|
|
@ -455,9 +454,7 @@ static int __init acpi_pcc_probe(void)
|
|||
acpi_status status = AE_OK;
|
||||
|
||||
/* Search for PCCT */
|
||||
status = acpi_get_table_with_size(ACPI_SIG_PCCT, 0,
|
||||
&pcct_tbl,
|
||||
&pcct_tbl_header_size);
|
||||
status = acpi_get_table(ACPI_SIG_PCCT, 0, &pcct_tbl);
|
||||
|
||||
if (ACPI_FAILURE(status) || !pcct_tbl) {
|
||||
pr_warn("PCCT header not found.\n");
|
||||
|
|
|
|||
Loading…
Reference in a new issue