Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 283238
b: refs/heads/master
c: b9e3238
h: refs/heads/master
v: v3
  • Loading branch information
Rajiv Andrade committed Nov 16, 2011
1 parent 80cf457 commit 7c73c54
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2f592f2a7d74c66763a6903edd04109132674d73
refs/heads/master: b9e3238aa36db33aa0d0bd44ef85297c45627aac
15 changes: 8 additions & 7 deletions trunk/drivers/char/tpm/tpm.c
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,6 @@ static ssize_t tpm_transmit(struct tpm_chip *chip, const char *buf,
}

#define TPM_DIGEST_SIZE 20
#define TPM_ERROR_SIZE 10
#define TPM_RET_CODE_IDX 6

enum tpm_capabilities {
Expand Down Expand Up @@ -467,12 +466,14 @@ static ssize_t transmit_cmd(struct tpm_chip *chip, struct tpm_cmd_t *cmd,
len = tpm_transmit(chip,(u8 *) cmd, len);
if (len < 0)
return len;
if (len == TPM_ERROR_SIZE) {
err = be32_to_cpu(cmd->header.out.return_code);
dev_dbg(chip->dev, "A TPM error (%d) occurred %s\n", err, desc);
return err;
}
return 0;
else if (len < TPM_HEADER_SIZE)
return -EFAULT;

err = be32_to_cpu(cmd->header.out.return_code);
if (err != 0)
dev_err(chip->dev, "A TPM error (%d) occurred %s\n", err, desc);

return err;
}

#define TPM_INTERNAL_RESULT_SIZE 200
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/char/tpm/tpm.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ enum tpm_addr {
};

#define TPM_WARN_DOING_SELFTEST 0x802

#define TPM_HEADER_SIZE 10
extern ssize_t tpm_show_pubek(struct device *, struct device_attribute *attr,
char *);
extern ssize_t tpm_show_pcrs(struct device *, struct device_attribute *attr,
Expand Down
2 changes: 0 additions & 2 deletions trunk/drivers/char/tpm/tpm_tis.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@
#include <linux/freezer.h>
#include "tpm.h"

#define TPM_HEADER_SIZE 10

enum tis_access {
TPM_ACCESS_VALID = 0x80,
TPM_ACCESS_ACTIVE_LOCALITY = 0x20,
Expand Down

0 comments on commit 7c73c54

Please sign in to comment.