aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char
diff options
context:
space:
mode:
authorJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>2016-02-16 19:10:52 -0500
committerJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>2016-02-20 02:59:33 -0500
commit30f9c8c9e2ea37473a51354e9e492580a40661ce (patch)
tree9bbe501babb3545be8f504a874c56169607954c7 /drivers/char
parent186d124f07da193a8f47e491af85cb695d415f2f (diff)
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: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> Fixes: 1bd047be37d9 ("tpm_crb: Use devm_ioremap_resource")
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/tpm/tpm_crb.c4
-rw-r--r--drivers/char/tpm/tpm_tis.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/drivers/char/tpm/tpm_crb.c b/drivers/char/tpm/tpm_crb.c
index 916332c9d906..9eb04044c385 100644
--- a/drivers/char/tpm/tpm_crb.c
+++ b/drivers/char/tpm/tpm_crb.c
@@ -227,8 +227,10 @@ static int crb_check_resource(struct acpi_resource *ares, void *data)
227 struct crb_priv *priv = data; 227 struct crb_priv *priv = data;
228 struct resource res; 228 struct resource res;
229 229
230 if (acpi_dev_resource_memory(ares, &res)) 230 if (acpi_dev_resource_memory(ares, &res)) {
231 priv->res = res; 231 priv->res = res;
232 priv->res.name = NULL;
233 }
232 234
233 return 1; 235 return 1;
234} 236}
diff --git a/drivers/char/tpm/tpm_tis.c b/drivers/char/tpm/tpm_tis.c
index ca137b5b7c24..2b2eff9e769e 100644
--- a/drivers/char/tpm/tpm_tis.c
+++ b/drivers/char/tpm/tpm_tis.c
@@ -930,8 +930,10 @@ static int tpm_check_resource(struct acpi_resource *ares, void *data)
930 930
931 if (acpi_dev_resource_interrupt(ares, 0, &res)) 931 if (acpi_dev_resource_interrupt(ares, 0, &res))
932 tpm_info->irq = res.start; 932 tpm_info->irq = res.start;
933 else if (acpi_dev_resource_memory(ares, &res)) 933 else if (acpi_dev_resource_memory(ares, &res)) {
934 tpm_info->res = res; 934 tpm_info->res = res;
935 tpm_info->res.name = NULL;
936 }
935 937
936 return 1; 938 return 1;
937} 939}