diff options
author | Jason Gunthorpe <jgunthorpe@obsidianresearch.com> | 2013-10-03 00:51:09 -0400 |
---|---|---|
committer | Peter Huewe <peterhuewe@gmx.de> | 2013-10-22 13:43:01 -0400 |
commit | 187eea0c353abd4ffa3a9cc86a660af9605fcb10 (patch) | |
tree | 056d3de6e71f68ef6aeb5bb2d024fac3af5ff5da /drivers/char/tpm | |
parent | 9deb0eb7cad450cd942a0eca11a198f6d24cb3d4 (diff) |
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: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Diffstat (limited to 'drivers/char/tpm')
-rw-r--r-- | drivers/char/tpm/Makefile | 7 | ||||
-rw-r--r-- | drivers/char/tpm/tpm_eventlog.c | 3 | ||||
-rw-r--r-- | drivers/char/tpm/tpm_ppi.c | 4 |
3 files changed, 3 insertions, 11 deletions
diff --git a/drivers/char/tpm/Makefile b/drivers/char/tpm/Makefile index 83b8a9d7527e..15df2f38ae42 100644 --- a/drivers/char/tpm/Makefile +++ b/drivers/char/tpm/Makefile | |||
@@ -3,14 +3,13 @@ | |||
3 | # | 3 | # |
4 | obj-$(CONFIG_TCG_TPM) += tpm.o | 4 | obj-$(CONFIG_TCG_TPM) += tpm.o |
5 | tpm-y := tpm-interface.o | 5 | tpm-y := tpm-interface.o |
6 | tpm-$(CONFIG_ACPI) += tpm_ppi.o | ||
6 | 7 | ||
7 | ifdef CONFIG_ACPI | 8 | ifdef CONFIG_ACPI |
8 | obj-$(CONFIG_TCG_TPM) += tpm_bios.o | 9 | tpm-y += tpm_eventlog.o tpm_acpi.o |
9 | tpm_bios-objs += tpm_eventlog.o tpm_acpi.o tpm_ppi.o | ||
10 | else | 10 | else |
11 | ifdef CONFIG_TCG_IBMVTPM | 11 | ifdef CONFIG_TCG_IBMVTPM |
12 | obj-$(CONFIG_TCG_TPM) += tpm_bios.o | 12 | tpm-y += tpm_eventlog.o tpm_of.o |
13 | tpm_bios-objs += tpm_eventlog.o tpm_of.o | ||
14 | endif | 13 | endif |
15 | endif | 14 | endif |
16 | obj-$(CONFIG_TCG_TIS) += tpm_tis.o | 15 | obj-$(CONFIG_TCG_TIS) += tpm_tis.o |
diff --git a/drivers/char/tpm/tpm_eventlog.c b/drivers/char/tpm/tpm_eventlog.c index 84ddc557b8f8..59f7cb28260b 100644 --- a/drivers/char/tpm/tpm_eventlog.c +++ b/drivers/char/tpm/tpm_eventlog.c | |||
@@ -406,7 +406,6 @@ out_tpm: | |||
406 | out: | 406 | out: |
407 | return NULL; | 407 | return NULL; |
408 | } | 408 | } |
409 | EXPORT_SYMBOL_GPL(tpm_bios_log_setup); | ||
410 | 409 | ||
411 | void tpm_bios_log_teardown(struct dentry **lst) | 410 | void tpm_bios_log_teardown(struct dentry **lst) |
412 | { | 411 | { |
@@ -415,5 +414,3 @@ void tpm_bios_log_teardown(struct dentry **lst) | |||
415 | for (i = 0; i < 3; i++) | 414 | for (i = 0; i < 3; i++) |
416 | securityfs_remove(lst[i]); | 415 | securityfs_remove(lst[i]); |
417 | } | 416 | } |
418 | EXPORT_SYMBOL_GPL(tpm_bios_log_teardown); | ||
419 | MODULE_LICENSE("GPL"); | ||
diff --git a/drivers/char/tpm/tpm_ppi.c b/drivers/char/tpm/tpm_ppi.c index 2168d15bc728..8e562dc65601 100644 --- a/drivers/char/tpm/tpm_ppi.c +++ b/drivers/char/tpm/tpm_ppi.c | |||
@@ -452,12 +452,8 @@ int tpm_add_ppi(struct kobject *parent) | |||
452 | { | 452 | { |
453 | return sysfs_create_group(parent, &ppi_attr_grp); | 453 | return sysfs_create_group(parent, &ppi_attr_grp); |
454 | } | 454 | } |
455 | EXPORT_SYMBOL_GPL(tpm_add_ppi); | ||
456 | 455 | ||
457 | void tpm_remove_ppi(struct kobject *parent) | 456 | void tpm_remove_ppi(struct kobject *parent) |
458 | { | 457 | { |
459 | sysfs_remove_group(parent, &ppi_attr_grp); | 458 | sysfs_remove_group(parent, &ppi_attr_grp); |
460 | } | 459 | } |
461 | EXPORT_SYMBOL_GPL(tpm_remove_ppi); | ||
462 | |||
463 | MODULE_LICENSE("GPL"); | ||