aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char
diff options
context:
space:
mode:
authorJames Morris <jmorris@namei.org>2010-05-06 19:19:29 -0400
committerJames Morris <jmorris@namei.org>2010-05-06 19:19:29 -0400
commitec4a162af388a2716c5314c4aff7029071d09f57 (patch)
tree10b5c972f756620c8bba693a4363029c42d37ef3 /drivers/char
parentf70e2e06196ad4c1c762037da2f75354f6c16b81 (diff)
Revert "TPM: ACPI/PNP dependency removal"
This reverts commit b89e66e1e396f7b5436af154e58209320cc08aed. > > When CONFIG_PM is not set: > > > > drivers/built-in.o: In function `acpi_init': > > bus.c:(.init.text+0x2d84): undefined reference to `pm_flags' > > bus.c:(.init.text+0x2d91): undefined reference to `pm_flags' > > CONFIG_ACPI depends on CONFIG_PM, > so acpi/bus.c should not be compiled for CONFIG_PM=n > > Hmm, is is somebody doing something strange, like "select ACPI" > without guaranteeing that all of ACPI's dependencies are satisfied? Signed-off-by: James Morris <jmorris@namei.org>
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/tpm/Kconfig14
-rw-r--r--drivers/char/tpm/tpm_tis.c40
2 files changed, 22 insertions, 32 deletions
diff --git a/drivers/char/tpm/Kconfig b/drivers/char/tpm/Kconfig
index bfc2c26780fb..f5fc64f89c5c 100644
--- a/drivers/char/tpm/Kconfig
+++ b/drivers/char/tpm/Kconfig
@@ -17,28 +17,20 @@ menuconfig TCG_TPM
17 obtained at: <http://sourceforge.net/projects/trousers>. To 17 obtained at: <http://sourceforge.net/projects/trousers>. To
18 compile this driver as a module, choose M here; the module 18 compile this driver as a module, choose M here; the module
19 will be called tpm. If unsure, say N. 19 will be called tpm. If unsure, say N.
20 Note: For more TPM drivers and BIOS LOG access enable 20 Note: For more TPM drivers enable CONFIG_PNP, CONFIG_ACPI
21 CONFIG_PNP, CONFIG_ACPI and CONFIG_PNPACPI. 21 and CONFIG_PNPACPI.
22 22
23if TCG_TPM 23if TCG_TPM
24 24
25config TCG_TIS 25config TCG_TIS
26 tristate "TPM Interface Specification 1.2 Interface" 26 tristate "TPM Interface Specification 1.2 Interface"
27 depends on PNP
27 ---help--- 28 ---help---
28 If you have a TPM security chip that is compliant with the 29 If you have a TPM security chip that is compliant with the
29 TCG TIS 1.2 TPM specification say Yes and it will be accessible 30 TCG TIS 1.2 TPM specification say Yes and it will be accessible
30 from within Linux. To compile this driver as a module, choose 31 from within Linux. To compile this driver as a module, choose
31 M here; the module will be called tpm_tis. 32 M here; the module will be called tpm_tis.
32 33
33config TCG_BIOS_LOG
34 bool "TPM bios mesurement log"
35 depends on X86
36 select ACPI
37 ---help---
38 ACPI is required for access to bios measurements lists and therefore
39 to validate the PCR[0] value. So say Yes in case you want this
40 feature and, consequently, ACPI will be enabled.
41
42config TCG_NSC 34config TCG_NSC
43 tristate "National Semiconductor TPM Interface" 35 tristate "National Semiconductor TPM Interface"
44 ---help--- 36 ---help---
diff --git a/drivers/char/tpm/tpm_tis.c b/drivers/char/tpm/tpm_tis.c
index 24314a9cffe8..94345994f8a6 100644
--- a/drivers/char/tpm/tpm_tis.c
+++ b/drivers/char/tpm/tpm_tis.c
@@ -598,7 +598,7 @@ out_err:
598 tpm_remove_hardware(chip->dev); 598 tpm_remove_hardware(chip->dev);
599 return rc; 599 return rc;
600} 600}
601#ifdef CONFIG_PNP 601
602static int __devinit tpm_tis_pnp_init(struct pnp_dev *pnp_dev, 602static int __devinit tpm_tis_pnp_init(struct pnp_dev *pnp_dev,
603 const struct pnp_device_id *pnp_id) 603 const struct pnp_device_id *pnp_id)
604{ 604{
@@ -663,7 +663,7 @@ static struct pnp_driver tis_pnp_driver = {
663module_param_string(hid, tpm_pnp_tbl[TIS_HID_USR_IDX].id, 663module_param_string(hid, tpm_pnp_tbl[TIS_HID_USR_IDX].id,
664 sizeof(tpm_pnp_tbl[TIS_HID_USR_IDX].id), 0444); 664 sizeof(tpm_pnp_tbl[TIS_HID_USR_IDX].id), 0444);
665MODULE_PARM_DESC(hid, "Set additional specific HID for this driver to probe"); 665MODULE_PARM_DESC(hid, "Set additional specific HID for this driver to probe");
666#endif 666
667static int tpm_tis_suspend(struct platform_device *dev, pm_message_t msg) 667static int tpm_tis_suspend(struct platform_device *dev, pm_message_t msg)
668{ 668{
669 return tpm_pm_suspend(&dev->dev, msg); 669 return tpm_pm_suspend(&dev->dev, msg);
@@ -690,21 +690,21 @@ MODULE_PARM_DESC(force, "Force device probe rather than using ACPI entry");
690static int __init init_tis(void) 690static int __init init_tis(void)
691{ 691{
692 int rc; 692 int rc;
693#ifdef CONFIG_PNP
694 if (!force)
695 return pnp_register_driver(&tis_pnp_driver);
696#endif
697 693
698 rc = platform_driver_register(&tis_drv); 694 if (force) {
699 if (rc < 0) 695 rc = platform_driver_register(&tis_drv);
696 if (rc < 0)
697 return rc;
698 if (IS_ERR(pdev=platform_device_register_simple("tpm_tis", -1, NULL, 0)))
699 return PTR_ERR(pdev);
700 if((rc=tpm_tis_init(&pdev->dev, TIS_MEM_BASE, TIS_MEM_LEN, 0)) != 0) {
701 platform_device_unregister(pdev);
702 platform_driver_unregister(&tis_drv);
703 }
700 return rc; 704 return rc;
701 if (IS_ERR(pdev=platform_device_register_simple("tpm_tis", -1, NULL, 0)))
702 return PTR_ERR(pdev);
703 if((rc=tpm_tis_init(&pdev->dev, TIS_MEM_BASE, TIS_MEM_LEN, 0)) != 0) {
704 platform_device_unregister(pdev);
705 platform_driver_unregister(&tis_drv);
706 } 705 }
707 return rc; 706
707 return pnp_register_driver(&tis_pnp_driver);
708} 708}
709 709
710static void __exit cleanup_tis(void) 710static void __exit cleanup_tis(void)
@@ -728,14 +728,12 @@ static void __exit cleanup_tis(void)
728 list_del(&i->list); 728 list_del(&i->list);
729 } 729 }
730 spin_unlock(&tis_lock); 730 spin_unlock(&tis_lock);
731#ifdef CONFIG_PNP 731
732 if (!force) { 732 if (force) {
733 platform_device_unregister(pdev);
734 platform_driver_unregister(&tis_drv);
735 } else
733 pnp_unregister_driver(&tis_pnp_driver); 736 pnp_unregister_driver(&tis_pnp_driver);
734 return;
735 }
736#endif
737 platform_device_unregister(pdev);
738 platform_driver_unregister(&tis_drv);
739} 737}
740 738
741module_init(init_tis); 739module_init(init_tis);