TPM: Fixup boot probe timeout for tpm_tis driver
commit3aad23963b58deb117f763805176b5dec74dc5b0
authorJason Gunthorpe <jgunthorpe@obsidianresearch.com>
Wed, 9 Sep 2009 23:22:18 +0000 (9 17:22 -0600)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 24 Sep 2009 15:27:11 +0000 (24 08:27 -0700)
treedfedd0f846c05dc2090d0b00c8dc37f35856916e
parent423b4ef5e712ef34d55d070d0cb84c9bb4a07ec2
TPM: Fixup boot probe timeout for tpm_tis driver

commit ec57935837a78f9661125b08a5d08b697568e040 upstream.

When probing the device in tpm_tis_init the call request_locality
uses timeout_a, which wasn't being initalized until after
request_locality. This results in request_locality falsely timing
out if the chip is still starting. Move the initialization to before
request_locality.

This probably only matters for embedded cases (ie mine), a BIOS likely
gets the TPM into a state where this code path isn't necessary.

Signed-off-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Acked-by: Rajiv Andrade <srajiv@linux.vnet.ibm.com>
Signed-off-by: James Morris <jmorris@namei.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/char/tpm/tpm_tis.c