linux-stable/drivers/char/tpm
Jason Gunthorpe 00194826e6 tpm_tis: Clean up the force=1 module parameter
The TPM core has long assumed that every device has a driver attached,
however the force path was attaching the TPM core outside of a driver
context. This isn't generally reliable as the user could detatch the
driver using sysfs or something, but commit b8b2c7d845 ("base/platform:
assert that dev_pm_domain callbacks are called unconditionally")
forced the issue by leaving the driver pointer NULL if there is
no probe.

Rework the TPM setup to create a platform device with resources and
then allow the driver core to naturally bind and probe it through the
normal mechanisms. All this structure is needed anyhow to enable TPM
for OF environments.

Finally, since the entire flow is changing convert the init/exit to use
the modern ifdef-less coding style when possible

Reported-by: "Wilck, Martin" <martin.wilck@ts.fujitsu.com>
Signed-off-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Tested-by: Wilck, Martin <martin.wilck@ts.fujitsu.com>
Tested-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Acked-by: Peter Huewe <peterhuewe@gmx.de>
2016-02-10 04:11:37 +02:00
..
st33zp24 Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security 2015-11-05 15:32:38 -08:00
Kconfig tpm: Update KConfig text to include TPM2.0 FIFO chips 2015-03-18 22:43:07 +01:00
Makefile tpm/tpm_i2c_stm_st33: Split tpm_i2c_tpm_st33 in 2 layers (core + phy) 2015-03-18 22:43:06 +01:00
tpm-chip.c tpm: fix compat 'ppi' link handling in tpm_chip_register() 2015-11-09 17:52:56 +02:00
tpm-dev.c tpm: device class for tpm 2015-01-17 14:00:10 +01:00
tpm-interface.c tpm: rework tpm_get_timeouts() 2015-12-20 15:23:46 +02:00
tpm-sysfs.c tpm: rename chip->dev to chip->pdev 2015-01-17 14:00:09 +01:00
tpm.h tpm_crb: Use the common ACPI definition of struct acpi_tpm2 2016-02-10 04:11:18 +02:00
tpm2-cmd.c tpm: fix checks for policy digest existence in tpm2_seal_trusted() 2016-02-10 04:10:55 +02:00
tpm_acpi.c ACPI: Clean up acpi_os_map/unmap_memory() to eliminate __iomem. 2014-05-27 18:13:08 +02:00
tpm_atmel.c tpm: rename chip->dev to chip->pdev 2015-01-17 14:00:09 +01:00
tpm_atmel.h tpmdd maintainers 2007-08-22 19:52:44 -07:00
tpm_crb.c tpm_crb: Use the common ACPI definition of struct acpi_tpm2 2016-02-10 04:11:18 +02:00
tpm_eventlog.c vTPM: support little endian guests 2015-10-19 01:09:30 +02:00
tpm_eventlog.h vTPM: support little endian guests 2015-10-19 01:09:30 +02:00
tpm_i2c_atmel.c char: Drop owner assignment from i2c_driver 2015-10-19 01:05:27 +02:00
tpm_i2c_infineon.c char: Drop owner assignment from i2c_driver 2015-10-19 01:05:27 +02:00
tpm_i2c_nuvoton.c char: Drop owner assignment from i2c_driver 2015-10-19 01:05:27 +02:00
tpm_ibmvtpm.c tpm_ibmvtpm: properly handle interrupted packet receptions 2015-12-20 15:27:12 +02:00
tpm_ibmvtpm.h tpm_ibmvtpm: properly handle interrupted packet receptions 2015-12-20 15:27:12 +02:00
tpm_infineon.c Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security 2015-04-15 11:08:27 -07:00
tpm_nsc.c tpm: rename chip->dev to chip->pdev 2015-01-17 14:00:09 +01:00
tpm_of.c TPM: Avoid reference to potentially freed memory 2015-11-09 17:52:55 +02:00
tpm_ppi.c tpm: move the PPI attributes to character device directory. 2015-10-19 01:01:20 +02:00
tpm_tis.c tpm_tis: Clean up the force=1 module parameter 2016-02-10 04:11:37 +02:00
xen-tpmfront.c xenbus_client: Extend interface to support multi-page ring 2015-04-15 10:56:47 +01:00