Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=2490c681ea3d7f5ac3fb876f14567bf1a9e0aa87
Commit:     2490c681ea3d7f5ac3fb876f14567bf1a9e0aa87
Parent:     40d6a146629b98d8e322b6f9332b182c7cbff3df
Author:     David Smith <[EMAIL PROTECTED]>
AuthorDate: Mon Jan 14 00:55:12 2008 -0800
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Mon Jan 14 08:52:22 2008 -0800

    TPM: fix suspend and resume failure
    
    The savestate command structure was being overwritten by the result of
    running the TPM_SaveState command after one run, so make it a local
    variable to the function instead of a global variable that gets
    overwritten.
    
    Acked-by: Pavel Machek <[EMAIL PROTECTED]>
    Cc: Kent Yoder <[EMAIL PROTECTED]>
    Cc: Marcel Selhorst <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 drivers/char/tpm/tpm.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/char/tpm/tpm.c b/drivers/char/tpm/tpm.c
index 39564b7..c88424a 100644
--- a/drivers/char/tpm/tpm.c
+++ b/drivers/char/tpm/tpm.c
@@ -1046,12 +1046,6 @@ void tpm_remove_hardware(struct device *dev)
 }
 EXPORT_SYMBOL_GPL(tpm_remove_hardware);
 
-static u8 savestate[] = {
-       0, 193,                 /* TPM_TAG_RQU_COMMAND */
-       0, 0, 0, 10,            /* blob length (in bytes) */
-       0, 0, 0, 152            /* TPM_ORD_SaveState */
-};
-
 /*
  * We are about to suspend. Save the TPM state
  * so that it can be restored.
@@ -1059,6 +1053,12 @@ static u8 savestate[] = {
 int tpm_pm_suspend(struct device *dev, pm_message_t pm_state)
 {
        struct tpm_chip *chip = dev_get_drvdata(dev);
+       u8 savestate[] = {
+               0, 193,         /* TPM_TAG_RQU_COMMAND */
+               0, 0, 0, 10,    /* blob length (in bytes) */
+               0, 0, 0, 152    /* TPM_ORD_SaveState */
+       };
+
        if (chip == NULL)
                return -ENODEV;
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to