aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/tpm/tpm-chip.c
diff options
context:
space:
mode:
authorJason Gunthorpe <jgunthorpe@obsidianresearch.com>2016-10-26 16:28:46 -0600
committerJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>2016-11-28 01:31:31 +0200
commit1a277e674bc2cf5300c77e1901ae2357726afe07 (patch)
treed49202b76524df05a778c9125861434cccf30d99 /drivers/char/tpm/tpm-chip.c
parent1f0f30e404b3d8f4597a2d9b77fba55452f8fd0e (diff)
tpm: Get rid of TPM_CHIP_FLAG_REGISTERED
This is no longer necessary, all calls to tpm_chip_unregister happen in remove() callbacks. Signed-off-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com> Reviewed-by: Tomas Winkler <tomas.winkler@intel.com> Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Diffstat (limited to 'drivers/char/tpm/tpm-chip.c')
-rw-r--r--drivers/char/tpm/tpm-chip.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/drivers/char/tpm/tpm-chip.c b/drivers/char/tpm/tpm-chip.c
index e5950131bd90..836f056f7d27 100644
--- a/drivers/char/tpm/tpm-chip.c
+++ b/drivers/char/tpm/tpm-chip.c
@@ -375,8 +375,6 @@ int tpm_chip_register(struct tpm_chip *chip)
return rc;
}
- chip->flags |= TPM_CHIP_FLAG_REGISTERED;
-
rc = tpm_add_legacy_sysfs(chip);
if (rc) {
tpm_chip_unregister(chip);
@@ -402,9 +400,6 @@ EXPORT_SYMBOL_GPL(tpm_chip_register);
*/
void tpm_chip_unregister(struct tpm_chip *chip)
{
- if (!(chip->flags & TPM_CHIP_FLAG_REGISTERED))
- return;
-
tpm_del_legacy_sysfs(chip);
tpm1_chip_unregister(chip);

Privacy Policy