Skip to contentSkip to conversation

prevent module removal

PATCH New Stefan Berger 1 participant 1 message May 10, 2006

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 prevent module removal

This patch fixes the building of the Xen TPM driver as module and prevents front- and backends to be rmmod'ed by removing their module_exit line.

xen-unstable.hg/linux-2.6-xen-sparse/drivers/char/tpm/Kconfig +4 -5
Index: root/xen-unstable.hg/linux-2.6-xen-sparse/drivers/char/tpm/Kconfig
===================================================================
@@ -53,10 +53,9 @@ config TCG_XEN
 	tristate "XEN TPM Interface"
 	depends on TCG_TPM && XEN
 	---help---
-	  If you want to make TPM support available to a Xen
-	  user domain, say Yes and it will
-          be accessible from within Linux. To compile this driver
-          as a module, choose M here; the module will be called
-          tpm_xen.
+	  If you want to make TPM support available to a Xen user domain,
+	  say Yes and it will be accessible from within Linux.
+	  To compile this driver as a module, choose M here; the module
+	  will be called tpm_xenu.
 
 endmenu
xen-unstable.hg/linux-2.6-xen-sparse/drivers/char/tpm/Makefile +2 -1
Index: root/xen-unstable.hg/linux-2.6-xen-sparse/drivers/char/tpm/Makefile
===================================================================
@@ -8,4 +8,5 @@ endif
 obj-$(CONFIG_TCG_NSC) += tpm_nsc.o
 obj-$(CONFIG_TCG_ATMEL) += tpm_atmel.o
 obj-$(CONFIG_TCG_INFINEON) += tpm_infineon.o
-obj-$(CONFIG_TCG_XEN) += tpm_xen.o tpm_vtpm.o
+obj-$(CONFIG_TCG_XEN) += tpm_xenu.o
+tpm_xenu-y = tpm_xen.o tpm_vtpm.o
xen-unstable.hg/linux-2.6-xen-sparse/drivers/xen/tpmback/tpmback.c +0 -2
Index: root/xen-unstable.hg/linux-2.6-xen-sparse/drivers/xen/tpmback/tpmback.c
===================================================================
@@ -1071,8 +1071,6 @@ static void __exit tpmback_exit(void)
 	misc_deregister(&vtpms_miscdevice);
 }
 
-module_exit(tpmback_exit);
-
 MODULE_LICENSE("Dual BSD/GPL");
 
 /*
xen-unstable.hg/linux-2.6-xen-sparse/drivers/char/tpm/tpm_xen.c +0 -1
Index: root/xen-unstable.hg/linux-2.6-xen-sparse/drivers/char/tpm/tpm_xen.c
===================================================================
@@ -752,7 +752,6 @@ static void __exit tpmif_exit(void)
 }
 
 module_init(tpmif_init);
-module_exit(tpmif_exit);
 
 MODULE_LICENSE("Dual BSD/GPL");
 

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel