tpm: remove tpm_register_driver()

No more users of be_drivers[], drop that too.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
This commit is contained in:
Marc-André Lureau 2017-10-10 00:55:47 +02:00 committed by Stefan Berger
parent d91a7a575e
commit ed836d9d6b
4 changed files with 0 additions and 11 deletions

View File

@ -581,7 +581,6 @@ static const TypeInfo tpm_emulator_info = {
static void tpm_emulator_register(void) static void tpm_emulator_register(void)
{ {
type_register_static(&tpm_emulator_info); type_register_static(&tpm_emulator_info);
tpm_register_driver(&tpm_emulator_driver);
} }
type_init(tpm_emulator_register) type_init(tpm_emulator_register)

View File

@ -418,7 +418,6 @@ static const TypeInfo tpm_passthrough_info = {
static void tpm_passthrough_register(void) static void tpm_passthrough_register(void)
{ {
type_register_static(&tpm_passthrough_info); type_register_static(&tpm_passthrough_info);
tpm_register_driver(&tpm_passthrough_driver);
} }
type_init(tpm_passthrough_register) type_init(tpm_passthrough_register)

View File

@ -216,6 +216,5 @@ TPMInfo *tpm_backend_query_tpm(TPMBackend *s);
TPMBackend *qemu_find_tpm(const char *id); TPMBackend *qemu_find_tpm(const char *id);
void tpm_register_model(enum TpmModel model); void tpm_register_model(enum TpmModel model);
void tpm_register_driver(const TPMDriverOps *tdo);
#endif #endif

8
tpm.c
View File

@ -23,7 +23,6 @@
static QLIST_HEAD(, TPMBackend) tpm_backends = static QLIST_HEAD(, TPMBackend) tpm_backends =
QLIST_HEAD_INITIALIZER(tpm_backends); QLIST_HEAD_INITIALIZER(tpm_backends);
static TPMDriverOps const *be_drivers[TPM_TYPE__MAX];
static bool tpm_models[TPM_MODEL__MAX]; static bool tpm_models[TPM_MODEL__MAX];
void tpm_register_model(enum TpmModel model) void tpm_register_model(enum TpmModel model)
@ -33,13 +32,6 @@ void tpm_register_model(enum TpmModel model)
#ifdef CONFIG_TPM #ifdef CONFIG_TPM
void tpm_register_driver(const TPMDriverOps *tdo)
{
assert(!be_drivers[tdo->type]);
be_drivers[tdo->type] = tdo;
}
static const TPMDriverOps * static const TPMDriverOps *
tpm_driver_find_by_type(enum TpmType type) tpm_driver_find_by_type(enum TpmType type)
{ {