tpm_crb: Use devm_ioremap_resource
authorJason Gunthorpe <jgunthorpe@obsidianresearch.com>
Fri, 8 Jan 2016 00:36:26 +0000 (17:36 -0700)
committerJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Wed, 10 Feb 2016 02:11:51 +0000 (04:11 +0200)
commit1bd047be37d95bf65a219f4931215f71878ac060
tree2e34afde34909507da6125d8589ce263226f2526
parent1e3ed59d6200eb31b554dbdcfdde62d1e3d91f0c
tpm_crb: Use devm_ioremap_resource

To support the force mode in tpm_tis we need to use resource locking
in tpm_crb as well, via devm_ioremap_resource.

The light restructuring better aligns crb and tis and makes it easier
to see the that new changes make sense.

The control area and its associated buffers do not always fall in the
range of the iomem resource given by the ACPI object. This patch fixes
the issue by mapping the buffers if this is the case.

[jarkko.sakkinen@linux.intel.com: squashed update described in the
 last paragraph.]

Signed-off-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Tested-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Acked-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
drivers/char/tpm/tpm_crb.c