aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/tpm/tpm.c
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2011-02-27 10:40:36 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2011-02-27 10:40:36 -0500
commit78240e37963ac6f4483f6473c786c0f0ab7e78fe (patch)
treedbb1a62ec2efe4bd14ce2a7f2d8abe76b812ccb3 /drivers/char/tpm/tpm.c
parent59a4f92a3612f3c3ea4c13b43e0e50ae66abfa7b (diff)
parentfa4704fee22df9c24297305288b53ba8aae527b4 (diff)
Merge branch 'fix' of git://git.kernel.org/pub/scm/linux/kernel/git/ycmiao/pxa-linux-2.6 into fixes
Diffstat (limited to 'drivers/char/tpm/tpm.c')
-rw-r--r--drivers/char/tpm/tpm.c18
1 files changed, 2 insertions, 16 deletions
diff --git a/drivers/char/tpm/tpm.c b/drivers/char/tpm/tpm.c
index faf5a2c65926..36e0fa161c2b 100644
--- a/drivers/char/tpm/tpm.c
+++ b/drivers/char/tpm/tpm.c
@@ -577,11 +577,9 @@ duration:
577 if (rc) 577 if (rc)
578 return; 578 return;
579 579
580 if (be32_to_cpu(tpm_cmd.header.out.return_code) != 0 || 580 if (be32_to_cpu(tpm_cmd.header.out.return_code)
581 be32_to_cpu(tpm_cmd.header.out.length) 581 != 3 * sizeof(u32))
582 != sizeof(tpm_cmd.header.out) + sizeof(u32) + 3 * sizeof(u32))
583 return; 582 return;
584
585 duration_cap = &tpm_cmd.params.getcap_out.cap.duration; 583 duration_cap = &tpm_cmd.params.getcap_out.cap.duration;
586 chip->vendor.duration[TPM_SHORT] = 584 chip->vendor.duration[TPM_SHORT] =
587 usecs_to_jiffies(be32_to_cpu(duration_cap->tpm_short)); 585 usecs_to_jiffies(be32_to_cpu(duration_cap->tpm_short));
@@ -941,18 +939,6 @@ ssize_t tpm_show_caps_1_2(struct device * dev,
941} 939}
942EXPORT_SYMBOL_GPL(tpm_show_caps_1_2); 940EXPORT_SYMBOL_GPL(tpm_show_caps_1_2);
943 941
944ssize_t tpm_show_timeouts(struct device *dev, struct device_attribute *attr,
945 char *buf)
946{
947 struct tpm_chip *chip = dev_get_drvdata(dev);
948
949 return sprintf(buf, "%d %d %d\n",
950 jiffies_to_usecs(chip->vendor.duration[TPM_SHORT]),
951 jiffies_to_usecs(chip->vendor.duration[TPM_MEDIUM]),
952 jiffies_to_usecs(chip->vendor.duration[TPM_LONG]));
953}
954EXPORT_SYMBOL_GPL(tpm_show_timeouts);
955
956ssize_t tpm_store_cancel(struct device *dev, struct device_attribute *attr, 942ssize_t tpm_store_cancel(struct device *dev, struct device_attribute *attr,
957 const char *buf, size_t count) 943 const char *buf, size_t count)
958{ 944{