tpm, tpm_tis: do not check for the active locality in interrupt handler
authorLino Sanfilippo <l.sanfilippo@kunbus.com>
Thu, 24 Nov 2022 13:55:32 +0000 (14:55 +0100)
committerJarkko Sakkinen <jarkko@kernel.org>
Mon, 24 Apr 2023 13:15:53 +0000 (16:15 +0300)
commit35f621287ead686b66aa17aa605ed5d7c95883dc
treeeb8bcd5066f00ffa02c177da48f6f50790811cd4
parent4303553bced7a1d84583dada552393f5ebd31e54
tpm, tpm_tis: do not check for the active locality in interrupt handler

After driver initialization tpm_tis_data->locality may only be modified in
case of a LOCALITY CHANGE interrupt. In this case the interrupt handler
iterates over all localities only to assign the active one to
tpm_tis_data->locality.

However this information is never used any more, so the assignment is not
needed.
Furthermore without the assignment tpm_tis_data->locality cannot change any
more at driver runtime, and thus no protection against concurrent
modification is required when the variable is read at other places.

So remove this iteration entirely.

Signed-off-by: Lino Sanfilippo <l.sanfilippo@kunbus.com>
Tested-by: Jarkko Sakkinen <jarkko@kernel.org>
Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>
Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
drivers/char/tpm/tpm_tis_core.c