diff options
author | Kent Yoder <key@linux.vnet.ibm.com> | 2012-09-04 12:18:21 -0400 |
---|---|---|
committer | James Morris <james.l.morris@oracle.com> | 2012-09-11 23:18:31 -0400 |
commit | a40695edad6a69561b299272028c172e2d981666 (patch) | |
tree | 6712703f4f6c89fc47b42bf7fcf6a672810b1603 /drivers/char | |
parent | 9ddf6aa8cbc07764c7fe33cfdb8644ca5e828252 (diff) |
tpm: fix tpm_acpi sparse warning on different address spaces
acpi_os_map_memory expects its return value to be in the __iomem address
space. Tag the variable we're using as such and use memcpy_fromio to
avoid further sparse warnings.
Signed-off-by: Kent Yoder <key@linux.vnet.ibm.com>
Signed-off-by: James Morris <james.l.morris@oracle.com>
Diffstat (limited to 'drivers/char')
-rw-r--r-- | drivers/char/tpm/tpm_acpi.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/char/tpm/tpm_acpi.c b/drivers/char/tpm/tpm_acpi.c index fe3fa9431dc9..56051d0c97a2 100644 --- a/drivers/char/tpm/tpm_acpi.c +++ b/drivers/char/tpm/tpm_acpi.c | |||
@@ -49,7 +49,7 @@ int read_log(struct tpm_bios_log *log) | |||
49 | { | 49 | { |
50 | struct acpi_tcpa *buff; | 50 | struct acpi_tcpa *buff; |
51 | acpi_status status; | 51 | acpi_status status; |
52 | struct acpi_table_header *virt; | 52 | void __iomem *virt; |
53 | u64 len, start; | 53 | u64 len, start; |
54 | 54 | ||
55 | if (log->bios_event_log != NULL) { | 55 | if (log->bios_event_log != NULL) { |
@@ -102,7 +102,7 @@ int read_log(struct tpm_bios_log *log) | |||
102 | return -EIO; | 102 | return -EIO; |
103 | } | 103 | } |
104 | 104 | ||
105 | memcpy(log->bios_event_log, virt, len); | 105 | memcpy_fromio(log->bios_event_log, virt, len); |
106 | 106 | ||
107 | acpi_os_unmap_memory(virt, len); | 107 | acpi_os_unmap_memory(virt, len); |
108 | return 0; | 108 | return 0; |