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

Commit 30f9c8c9 authored by Jarkko Sakkinen's avatar Jarkko Sakkinen
Browse files

tpm_crb/tis: fix: use dev_name() for /proc/iomem



In all cases use dev_name() for the mapped resources. This is both
for sake of consistency and also with some platforms resource name
given by ACPI object seems to return garbage.

Signed-off-by: default avatarJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Fixes: 1bd047be ("tpm_crb: Use devm_ioremap_resource")
parent 186d124f
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -227,8 +227,10 @@ static int crb_check_resource(struct acpi_resource *ares, void *data)
	struct crb_priv *priv = data;
	struct resource res;

	if (acpi_dev_resource_memory(ares, &res))
	if (acpi_dev_resource_memory(ares, &res)) {
		priv->res = res;
		priv->res.name = NULL;
	}

	return 1;
}
+3 −1
Original line number Diff line number Diff line
@@ -930,8 +930,10 @@ static int tpm_check_resource(struct acpi_resource *ares, void *data)

	if (acpi_dev_resource_interrupt(ares, 0, &res))
		tpm_info->irq = res.start;
	else if (acpi_dev_resource_memory(ares, &res))
	else if (acpi_dev_resource_memory(ares, &res)) {
		tpm_info->res = res;
		tpm_info->res.name = NULL;
	}

	return 1;
}