mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-23 01:10:04 +00:00
tpm, tpm_crb: Handle 64-bit resource in crb_check_resource()
crb_check_resource() in TPM CRB driver calls acpi_dev_resource_memory() which only handles 32-bit resources. Adding a call to acpi_dev_resource_address_space() in TPM CRB driver which handles 64-bit resources. Signed-off-by: Jiandi An <anjiandi@codeaurora.org> Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> Tested-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
This commit is contained in:
parent
aea7f54f3c
commit
19b7bf51fc
1 changed files with 5 additions and 3 deletions
|
@ -264,10 +264,12 @@ static const struct tpm_class_ops tpm_crb = {
|
|||
static int crb_check_resource(struct acpi_resource *ares, void *data)
|
||||
{
|
||||
struct resource *io_res = data;
|
||||
struct resource res;
|
||||
struct resource_win win;
|
||||
struct resource *res = &(win.res);
|
||||
|
||||
if (acpi_dev_resource_memory(ares, &res)) {
|
||||
*io_res = res;
|
||||
if (acpi_dev_resource_memory(ares, res) ||
|
||||
acpi_dev_resource_address_space(ares, &win)) {
|
||||
*io_res = *res;
|
||||
io_res->name = NULL;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue