tpm_tis: Use devm_ioremap_resource
authorJason Gunthorpe <jgunthorpe@obsidianresearch.com>
Fri, 8 Jan 2016 00:36:23 +0000 (17:36 -0700)
committerJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Wed, 10 Feb 2016 02:11:33 +0000 (04:11 +0200)
commit51dd43dff74b0547ad844638f6910ca29c956819
tree4125f98506a266d67cb1607aa47ad2d0d2383961
parent4d627e672bd0e8af4e734fef93e806499d1e1277
tpm_tis: Use devm_ioremap_resource

This does a request_resource under the covers which means tis holds a
lock on the memory range it is using so other drivers cannot grab it.
When doing probing it is important to ensure that other drivers are
not using the same range before tis starts touching it.

To do this flow the actual struct resource from the device right
through to devm_ioremap_resource. This ensures all the proper resource
meta-data is carried down.

Signed-off-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Tested-by: Wilck, Martin <martin.wilck@ts.fujitsu.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>
drivers/char/tpm/tpm_tis.c