Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ec4a162a authored by James Morris's avatar James Morris
Browse files

Revert "TPM: ACPI/PNP dependency removal"



This reverts commit b89e66e1.

> > 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: default avatarJames Morris <jmorris@namei.org>
parent f70e2e06
Loading
Loading
Loading
Loading
+3 −11
Original line number Diff line number Diff line
@@ -17,28 +17,20 @@ menuconfig TCG_TPM
	  obtained at: <http://sourceforge.net/projects/trousers>.  To 
	  compile this driver as a module, choose M here; the module 
	  will be called tpm. If unsure, say N.
	  Note: For more TPM drivers and BIOS LOG access enable
	  CONFIG_PNP, CONFIG_ACPI and CONFIG_PNPACPI.
	  Note: For more TPM drivers enable CONFIG_PNP, CONFIG_ACPI
	  and CONFIG_PNPACPI.

if TCG_TPM

config TCG_TIS
	tristate "TPM Interface Specification 1.2 Interface"
	depends on PNP
	---help---
	  If you have a TPM security chip that is compliant with the
	  TCG TIS 1.2 TPM specification 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_tis.

config TCG_BIOS_LOG
	bool "TPM bios mesurement log"
	depends on X86
	select ACPI
	---help---
	  ACPI is required for access to bios measurements lists and therefore
	  to validate the PCR[0] value. So say Yes in case you want this
	  feature and, consequently, ACPI will be enabled.

config TCG_NSC
	tristate "National Semiconductor TPM Interface"
	---help---
+19 −21
Original line number Diff line number Diff line
@@ -598,7 +598,7 @@ out_err:
	tpm_remove_hardware(chip->dev);
	return rc;
}
#ifdef CONFIG_PNP

static int __devinit tpm_tis_pnp_init(struct pnp_dev *pnp_dev,
				      const struct pnp_device_id *pnp_id)
{
@@ -663,7 +663,7 @@ static struct pnp_driver tis_pnp_driver = {
module_param_string(hid, tpm_pnp_tbl[TIS_HID_USR_IDX].id,
		    sizeof(tpm_pnp_tbl[TIS_HID_USR_IDX].id), 0444);
MODULE_PARM_DESC(hid, "Set additional specific HID for this driver to probe");
#endif

static int tpm_tis_suspend(struct platform_device *dev, pm_message_t msg)
{
	return tpm_pm_suspend(&dev->dev, msg);
@@ -690,11 +690,8 @@ MODULE_PARM_DESC(force, "Force device probe rather than using ACPI entry");
static int __init init_tis(void)
{
	int rc;
#ifdef CONFIG_PNP
	if (!force)
		return pnp_register_driver(&tis_pnp_driver);
#endif

	if (force) {
		rc = platform_driver_register(&tis_drv);
		if (rc < 0)
			return rc;
@@ -707,6 +704,9 @@ static int __init init_tis(void)
		return rc;
	}

	return pnp_register_driver(&tis_pnp_driver);
}

static void __exit cleanup_tis(void)
{
	struct tpm_vendor_specific *i, *j;
@@ -728,14 +728,12 @@ static void __exit cleanup_tis(void)
		list_del(&i->list);
	}
	spin_unlock(&tis_lock);
#ifdef CONFIG_PNP
	if (!force) {
		pnp_unregister_driver(&tis_pnp_driver);
		return;
	}
#endif

	if (force) {
		platform_device_unregister(pdev);
		platform_driver_unregister(&tis_drv);
	} else
		pnp_unregister_driver(&tis_pnp_driver);
}

module_init(init_tis);