]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
tpm: Get rid of TPM_CHIP_FLAG_REGISTERED
authorJason Gunthorpe <jgunthorpe@obsidianresearch.com>
Wed, 26 Oct 2016 22:28:46 +0000 (16:28 -0600)
committerJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Sun, 27 Nov 2016 23:31:31 +0000 (01:31 +0200)
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>
drivers/char/tpm/tpm-chip.c
drivers/char/tpm/tpm.h

index e5950131bd907dbee3f4b4c3598c05572fcea416..836f056f7d27e60c761ac170f82b65906e3a56cf 100644 (file)
@@ -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);
index 21c3dbe8c89cb0423626edfd4bc7b0d9429e657c..f9401ca0454cb2b1c666314176f50290bb3d0ca2 100644 (file)
@@ -139,7 +139,6 @@ enum tpm2_startup_types {
 #define TPM_PPI_VERSION_LEN            3
 
 enum tpm_chip_flags {
-       TPM_CHIP_FLAG_REGISTERED        = BIT(0),
        TPM_CHIP_FLAG_TPM2              = BIT(1),
        TPM_CHIP_FLAG_IRQ               = BIT(2),
        TPM_CHIP_FLAG_VIRTUAL           = BIT(3),