diff options
author | Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> | 2016-03-31 06:05:36 -0400 |
---|---|---|
committer | Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> | 2016-06-25 10:26:35 -0400 |
commit | d30b8e4f68ef182f8dd84c76af9f148ca5842ea3 (patch) | |
tree | 9afe98d5c9fed7919bd181d19d7d0888bb741222 /drivers/char/tpm | |
parent | 796d803070c91f6e469e212acfdd618180f59e01 (diff) |
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>
Diffstat (limited to 'drivers/char/tpm')
-rw-r--r-- | drivers/char/tpm/tpm_tis.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/char/tpm/tpm_tis.c b/drivers/char/tpm/tpm_tis.c index eed3bf510682..18236f66c084 100644 --- a/drivers/char/tpm/tpm_tis.c +++ b/drivers/char/tpm/tpm_tis.c | |||
@@ -650,15 +650,13 @@ MODULE_PARM_DESC(interrupts, "Enable interrupts"); | |||
650 | 650 | ||
651 | static void tpm_tis_remove(struct tpm_chip *chip) | 651 | static void tpm_tis_remove(struct tpm_chip *chip) |
652 | { | 652 | { |
653 | void __iomem *reg = chip->vendor.iobase + | ||
654 | TPM_INT_ENABLE(chip->vendor.locality); | ||
655 | |||
653 | if (chip->flags & TPM_CHIP_FLAG_TPM2) | 656 | if (chip->flags & TPM_CHIP_FLAG_TPM2) |
654 | tpm2_shutdown(chip, TPM2_SU_CLEAR); | 657 | tpm2_shutdown(chip, TPM2_SU_CLEAR); |
655 | 658 | ||
656 | iowrite32(~TPM_GLOBAL_INT_ENABLE & | 659 | iowrite32(~TPM_GLOBAL_INT_ENABLE & ioread32(reg), reg); |
657 | ioread32(chip->vendor.iobase + | ||
658 | TPM_INT_ENABLE(chip->vendor. | ||
659 | locality)), | ||
660 | chip->vendor.iobase + | ||
661 | TPM_INT_ENABLE(chip->vendor.locality)); | ||
662 | release_locality(chip, chip->vendor.locality, 1); | 660 | release_locality(chip, chip->vendor.locality, 1); |
663 | } | 661 | } |
664 | 662 | ||