Commit 1a277e67 authored by Jason Gunthorpe's avatar Jason Gunthorpe Committed by Jarkko Sakkinen
Browse files

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: default avatarJason Gunthorpe <jgunthorpe@obsidianresearch.com>
Reviewed-by: default avatarTomas Winkler <tomas.winkler@intel.com>
Reviewed-by: default avatarJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Signed-off-by: default avatarJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
parent 1f0f30e4
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -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);
+0 −1
Original line number Diff line number Diff line
@@ -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),