mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Peter Huewe <peterhuewe@gmx.de>
To: james.l.morris@oracle.com, tpmdd-devel@lists.sourceforge.net,
	adlai@linux.vnet.ibm.com
Cc: linux-kernel@vger.kernel.org,
	Jason Gunthorpe <jgunthorpe@obsidianresearch.com>,
	Peter Huewe <peterhuewe@gmx.de>
Subject: [PATCH 11/15] tpm: Merge the tpm-bios module with tpm.o
Date: Tue, 22 Oct 2013 20:00:36 +0200	[thread overview]
Message-ID: <1382464840-7639-11-git-send-email-peterhuewe@gmx.de> (raw)
In-Reply-To: <1382464840-7639-6-git-send-email-peterhuewe@gmx.de>

From: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>

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>
Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
---
 drivers/char/tpm/Makefile       |    7 +++----
 drivers/char/tpm/tpm_eventlog.c |    3 ---
 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 83b8a9d..15df2f3 100644
--- a/drivers/char/tpm/Makefile
+++ b/drivers/char/tpm/Makefile
@@ -3,14 +3,13 @@
 #
 obj-$(CONFIG_TCG_TPM) += tpm.o
 tpm-y := tpm-interface.o
+tpm-$(CONFIG_ACPI) += tpm_ppi.o
 
 ifdef CONFIG_ACPI
-	obj-$(CONFIG_TCG_TPM) += tpm_bios.o
-	tpm_bios-objs += tpm_eventlog.o tpm_acpi.o tpm_ppi.o
+	tpm-y += tpm_eventlog.o tpm_acpi.o
 else
 ifdef CONFIG_TCG_IBMVTPM
-	obj-$(CONFIG_TCG_TPM) += tpm_bios.o
-	tpm_bios-objs += tpm_eventlog.o tpm_of.o
+	tpm-y += tpm_eventlog.o tpm_of.o
 endif
 endif
 obj-$(CONFIG_TCG_TIS) += tpm_tis.o
diff --git a/drivers/char/tpm/tpm_eventlog.c b/drivers/char/tpm/tpm_eventlog.c
index 84ddc55..59f7cb2 100644
--- a/drivers/char/tpm/tpm_eventlog.c
+++ b/drivers/char/tpm/tpm_eventlog.c
@@ -406,7 +406,6 @@ out_tpm:
 out:
 	return NULL;
 }
-EXPORT_SYMBOL_GPL(tpm_bios_log_setup);
 
 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++)
 		securityfs_remove(lst[i]);
 }
-EXPORT_SYMBOL_GPL(tpm_bios_log_teardown);
-MODULE_LICENSE("GPL");
diff --git a/drivers/char/tpm/tpm_ppi.c b/drivers/char/tpm/tpm_ppi.c
index 2168d15..8e562dc 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)
 {
 	return sysfs_create_group(parent, &ppi_attr_grp);
 }
-EXPORT_SYMBOL_GPL(tpm_add_ppi);
 
 void tpm_remove_ppi(struct kobject *parent)
 {
 	sysfs_remove_group(parent, &ppi_attr_grp);
 }
-EXPORT_SYMBOL_GPL(tpm_remove_ppi);
-
-MODULE_LICENSE("GPL");
-- 
1.7.5.4


  parent reply	other threads:[~2013-10-22 18:02 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-22 18:00 [PATCH 06/15] tpm: Remove redundant dev_set_drvdata Peter Huewe
2013-10-22 18:00 ` [PATCH 07/15] tpm: st33: Remove chip->data_buffer access from this driver Peter Huewe
2013-10-22 18:00 ` [PATCH 08/15] tpm: Remove tpm_show_caps_1_2 Peter Huewe
2013-10-22 18:00 ` [PATCH 09/15] tpm: cleanup checkpatch warnings Peter Huewe
2013-10-22 18:00 ` [PATCH 10/15] tpm: Rename tpm.c to tpm-interface.c Peter Huewe
2013-10-22 18:00 ` Peter Huewe [this message]
2013-10-22 18:00 ` [PATCH 12/15] tpm: Add support for the Nuvoton NPCT501 I2C TPM Peter Huewe
2013-10-22 18:00 ` [PATCH 13/15] tpm: Add support for Atmel I2C TPMs Peter Huewe
2013-10-22 18:00 ` [PATCH 14/15] tpm: Fix module name description in Kconfig for tpm_i2c_infineon Peter Huewe
2013-10-22 18:00 ` [PATCH 15/15] tpm: use tabs instead of whitespaces in Kconfig Peter Huewe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1382464840-7639-11-git-send-email-peterhuewe@gmx.de \
    --to=peterhuewe@gmx.de \
    --cc=adlai@linux.vnet.ibm.com \
    --cc=james.l.morris@oracle.com \
    --cc=jgunthorpe@obsidianresearch.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tpmdd-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®