tpm: cleanup tpm_tis_remove()
Created a local variable pointing to the INT_ENABLE_x register. The expression clearing INT_ENABLE_x.globalIntEnable is unreadable and hard to modify without surpassing the 80 char boundary. Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> Tested-by: Christophe Ricard <christophe-h.ricard@st.com>
This commit is contained in:
parent
796d803070
commit
d30b8e4f68
1 changed files with 4 additions and 6 deletions
|
@ -650,15 +650,13 @@ MODULE_PARM_DESC(interrupts, "Enable interrupts");
|
||||||
|
|
||||||
static void tpm_tis_remove(struct tpm_chip *chip)
|
static void tpm_tis_remove(struct tpm_chip *chip)
|
||||||
{
|
{
|
||||||
|
void __iomem *reg = chip->vendor.iobase +
|
||||||
|
TPM_INT_ENABLE(chip->vendor.locality);
|
||||||
|
|
||||||
if (chip->flags & TPM_CHIP_FLAG_TPM2)
|
if (chip->flags & TPM_CHIP_FLAG_TPM2)
|
||||||
tpm2_shutdown(chip, TPM2_SU_CLEAR);
|
tpm2_shutdown(chip, TPM2_SU_CLEAR);
|
||||||
|
|
||||||
iowrite32(~TPM_GLOBAL_INT_ENABLE &
|
iowrite32(~TPM_GLOBAL_INT_ENABLE & ioread32(reg), reg);
|
||||||
ioread32(chip->vendor.iobase +
|
|
||||||
TPM_INT_ENABLE(chip->vendor.
|
|
||||||
locality)),
|
|
||||||
chip->vendor.iobase +
|
|
||||||
TPM_INT_ENABLE(chip->vendor.locality));
|
|
||||||
release_locality(chip, chip->vendor.locality, 1);
|
release_locality(chip, chip->vendor.locality, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue