From: Jarkko Sakkinen Date: Fri, 12 Dec 2014 19:46:35 +0000 (-0800) Subject: tpm: fix raciness of PPI interface lookup X-Git-Tag: fixes-v4.0-rc1~129^2~26 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0dc553652102c55a43eb1ab52e2049e478469f53;p=pandora-kernel.git tpm: fix raciness of PPI interface lookup Traversal of the ACPI device tree was not done right. PPI interface should be looked up only from the ACPI device that is the platform device for the TPM. This could cause problems with systems with two TPM chips such as 4th gen Intel systems. In addition, added the missing license and copyright platter to the tpm_ppi.c. Signed-off-by: Jarkko Sakkinen Reviewed-by: Jasob Gunthorpe Reviewed-by: Stefan Berger Tested-by: Scot Doyle Signed-off-by: Peter Huewe --- diff --git a/drivers/char/tpm/tpm-chip.c b/drivers/char/tpm/tpm-chip.c index 7dc9999e2d54..64102de91ca3 100644 --- a/drivers/char/tpm/tpm-chip.c +++ b/drivers/char/tpm/tpm-chip.c @@ -147,7 +147,7 @@ int tpm_chip_register(struct tpm_chip *chip) if (rc) goto del_misc; - rc = tpm_add_ppi(&chip->dev->kobj); + rc = tpm_add_ppi(chip); if (rc) goto del_sysfs; @@ -191,7 +191,7 @@ void tpm_chip_unregister(struct tpm_chip *chip) if (chip->bios_dir) tpm_bios_log_teardown(chip->bios_dir); - tpm_remove_ppi(&chip->dev->kobj); + tpm_remove_ppi(chip); tpm_sysfs_del_device(chip); tpm_dev_del_device(chip); Reading git-diff-tree failed