diff --git a/hw/tpm/tpm_emulator.c b/hw/tpm/tpm_emulator.c index 95e1e041cf..187a69e442 100644 --- a/hw/tpm/tpm_emulator.c +++ b/hw/tpm/tpm_emulator.c @@ -581,7 +581,6 @@ static const TypeInfo tpm_emulator_info = { static void tpm_emulator_register(void) { type_register_static(&tpm_emulator_info); - tpm_register_driver(&tpm_emulator_driver); } type_init(tpm_emulator_register) diff --git a/hw/tpm/tpm_passthrough.c b/hw/tpm/tpm_passthrough.c index e6ace28b04..f04eab3e63 100644 --- a/hw/tpm/tpm_passthrough.c +++ b/hw/tpm/tpm_passthrough.c @@ -418,7 +418,6 @@ static const TypeInfo tpm_passthrough_info = { static void tpm_passthrough_register(void) { type_register_static(&tpm_passthrough_info); - tpm_register_driver(&tpm_passthrough_driver); } type_init(tpm_passthrough_register) diff --git a/include/sysemu/tpm_backend.h b/include/sysemu/tpm_backend.h index c6e5637f68..adb6a68076 100644 --- a/include/sysemu/tpm_backend.h +++ b/include/sysemu/tpm_backend.h @@ -216,6 +216,5 @@ TPMInfo *tpm_backend_query_tpm(TPMBackend *s); TPMBackend *qemu_find_tpm(const char *id); void tpm_register_model(enum TpmModel model); -void tpm_register_driver(const TPMDriverOps *tdo); #endif diff --git a/tpm.c b/tpm.c index ad2ed6a0da..75a589b837 100644 --- a/tpm.c +++ b/tpm.c @@ -23,7 +23,6 @@ static QLIST_HEAD(, TPMBackend) tpm_backends = QLIST_HEAD_INITIALIZER(tpm_backends); -static TPMDriverOps const *be_drivers[TPM_TYPE__MAX]; static bool tpm_models[TPM_MODEL__MAX]; void tpm_register_model(enum TpmModel model) @@ -33,13 +32,6 @@ void tpm_register_model(enum TpmModel model) #ifdef CONFIG_TPM -void tpm_register_driver(const TPMDriverOps *tdo) -{ - assert(!be_drivers[tdo->type]); - - be_drivers[tdo->type] = tdo; -} - static const TPMDriverOps * tpm_driver_find_by_type(enum TpmType type) {