Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 02438d87 authored by Len Brown's avatar Len Brown
Browse files

ACPI: delete acpi_os_free(), use kfree() directly



Signed-off-by: default avatarLen Brown <len.brown@intel.com>
parent d120cfb5
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -51,7 +51,7 @@ static acpi_status hp_ccsr_locate(acpi_handle obj, u64 *base, u64 *length)
	memcpy(length, vendor->byte_data + 8, sizeof(*length));

  exit:
	acpi_os_free(buffer.pointer);
	kfree(buffer.pointer);
	return status;
}

+6 −6
Original line number Diff line number Diff line
@@ -857,7 +857,7 @@ int acpi_map_lsapic(acpi_handle handle, int *pcpu)
	obj = buffer.pointer;
	if (obj->type != ACPI_TYPE_BUFFER ||
	    obj->buffer.length < sizeof(*lsapic)) {
		acpi_os_free(buffer.pointer);
		kfree(buffer.pointer);
		return -EINVAL;
	}

@@ -865,13 +865,13 @@ int acpi_map_lsapic(acpi_handle handle, int *pcpu)

	if ((lsapic->header.type != ACPI_MADT_LSAPIC) ||
	    (!lsapic->flags.enabled)) {
		acpi_os_free(buffer.pointer);
		kfree(buffer.pointer);
		return -EINVAL;
	}

	physid = ((lsapic->id << 8) | (lsapic->eid));

	acpi_os_free(buffer.pointer);
	kfree(buffer.pointer);
	buffer.length = ACPI_ALLOCATE_BUFFER;
	buffer.pointer = NULL;

@@ -935,20 +935,20 @@ acpi_map_iosapic(acpi_handle handle, u32 depth, void *context, void **ret)
	obj = buffer.pointer;
	if (obj->type != ACPI_TYPE_BUFFER ||
	    obj->buffer.length < sizeof(*iosapic)) {
		acpi_os_free(buffer.pointer);
		kfree(buffer.pointer);
		return AE_OK;
	}

	iosapic = (struct acpi_table_iosapic *)obj->buffer.pointer;

	if (iosapic->header.type != ACPI_MADT_IOSAPIC) {
		acpi_os_free(buffer.pointer);
		kfree(buffer.pointer);
		return AE_OK;
	}

	gsi_base = iosapic->global_irq_base;

	acpi_os_free(buffer.pointer);
	kfree(buffer.pointer);

	/*
	 * OK, it's an IOSAPIC MADT entry, look for a _PXM value to tell
+2 −2
Original line number Diff line number Diff line
@@ -466,7 +466,7 @@ static acpi_status is_memory_device(acpi_handle handle)

	info = buffer.pointer;
	if (!(info->valid & ACPI_VALID_HID)) {
		acpi_os_free(buffer.pointer);
		kfree(buffer.pointer);
		return AE_ERROR;
	}

@@ -475,7 +475,7 @@ static acpi_status is_memory_device(acpi_handle handle)
	    (strcmp(hardware_id, ACPI_MEMORY_DEVICE_HID)))
		status = AE_ERROR;

	acpi_os_free(buffer.pointer);
	kfree(buffer.pointer);
	return status;
}

+3 −3
Original line number Diff line number Diff line
@@ -1017,7 +1017,7 @@ static int asus_hotk_get_info(void)
		}
		hotk->methods = &model_conf[hotk->model];
		
		acpi_os_free(model);
		kfree(model);

		return AE_OK;
	}
@@ -1096,7 +1096,7 @@ static int asus_hotk_get_info(void)
		/* S1300A reports L84F, but L1400B too, account for that */
	}

	acpi_os_free(model);
	kfree(model);

	return AE_OK;
}
@@ -1256,7 +1256,7 @@ static void __exit asus_acpi_exit(void)
	acpi_bus_unregister_driver(&asus_hotk_driver);
	remove_proc_entry(PROC_ASUS, acpi_root_dir);

	acpi_os_free(asus_info);
	kfree(asus_info);

	return;
}
+2 −2
Original line number Diff line number Diff line
@@ -171,7 +171,7 @@ acpi_battery_get_info(struct acpi_battery *battery,
	}

      end:
	acpi_os_free(buffer.pointer);
	kfree(buffer.pointer);

	if (!result)
		(*bif) = (struct acpi_battery_info *)data.pointer;
@@ -231,7 +231,7 @@ acpi_battery_get_status(struct acpi_battery *battery,
	}

      end:
	acpi_os_free(buffer.pointer);
	kfree(buffer.pointer);

	if (!result)
		(*bst) = (struct acpi_battery_status *)data.pointer;
Loading