Commit 187eea0c authored by Jason Gunthorpe's avatar Jason Gunthorpe Committed by Peter Huewe

tpm: Merge the tpm-bios module with tpm.o

Now that we can have multiple .c files in the tpm module there is
no reason for tpm-bios.

tpm-bios exported several functions: tpm_bios_log_setup,
tpm_bios_log_teardown, tpm_add_ppi, and tpm_remove_ppi.

They are only used by tpm, and if tpm-bios is built then
tpm will unconditionally require them. Further, tpm-bios does
nothing on its own, it has no module_init function.

Thus we remove the exports and merge the modules to simplify things.

The Makefile conditions are changed slightly to match the code,
tpm_ppi is always required if CONFIG_ACPI is set.
Signed-off-by: default avatarJason Gunthorpe <jgunthorpe@obsidianresearch.com>
parent 9deb0eb7
...@@ -3,14 +3,13 @@ ...@@ -3,14 +3,13 @@
# #
obj-$(CONFIG_TCG_TPM) += tpm.o obj-$(CONFIG_TCG_TPM) += tpm.o
tpm-y := tpm-interface.o tpm-y := tpm-interface.o
tpm-$(CONFIG_ACPI) += tpm_ppi.o
ifdef CONFIG_ACPI ifdef CONFIG_ACPI
obj-$(CONFIG_TCG_TPM) += tpm_bios.o tpm-y += tpm_eventlog.o tpm_acpi.o
tpm_bios-objs += tpm_eventlog.o tpm_acpi.o tpm_ppi.o
else else
ifdef CONFIG_TCG_IBMVTPM ifdef CONFIG_TCG_IBMVTPM
obj-$(CONFIG_TCG_TPM) += tpm_bios.o tpm-y += tpm_eventlog.o tpm_of.o
tpm_bios-objs += tpm_eventlog.o tpm_of.o
endif endif
endif endif
obj-$(CONFIG_TCG_TIS) += tpm_tis.o obj-$(CONFIG_TCG_TIS) += tpm_tis.o
......
...@@ -406,7 +406,6 @@ struct dentry **tpm_bios_log_setup(char *name) ...@@ -406,7 +406,6 @@ struct dentry **tpm_bios_log_setup(char *name)
out: out:
return NULL; return NULL;
} }
EXPORT_SYMBOL_GPL(tpm_bios_log_setup);
void tpm_bios_log_teardown(struct dentry **lst) void tpm_bios_log_teardown(struct dentry **lst)
{ {
...@@ -415,5 +414,3 @@ void tpm_bios_log_teardown(struct dentry **lst) ...@@ -415,5 +414,3 @@ void tpm_bios_log_teardown(struct dentry **lst)
for (i = 0; i < 3; i++) for (i = 0; i < 3; i++)
securityfs_remove(lst[i]); securityfs_remove(lst[i]);
} }
EXPORT_SYMBOL_GPL(tpm_bios_log_teardown);
MODULE_LICENSE("GPL");
...@@ -452,12 +452,8 @@ int tpm_add_ppi(struct kobject *parent) ...@@ -452,12 +452,8 @@ int tpm_add_ppi(struct kobject *parent)
{ {
return sysfs_create_group(parent, &ppi_attr_grp); return sysfs_create_group(parent, &ppi_attr_grp);
} }
EXPORT_SYMBOL_GPL(tpm_add_ppi);
void tpm_remove_ppi(struct kobject *parent) void tpm_remove_ppi(struct kobject *parent)
{ {
sysfs_remove_group(parent, &ppi_attr_grp); sysfs_remove_group(parent, &ppi_attr_grp);
} }
EXPORT_SYMBOL_GPL(tpm_remove_ppi);
MODULE_LICENSE("GPL");
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment