aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/tpm/tpm_atmel.c
diff options
context:
space:
mode:
authorKylene Hall <kjhall@us.ibm.com>2005-06-23 22:01:48 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-24 00:05:24 -0700
commit3122a88a242454efe72930e56a3e4d56ee534f3c (patch)
tree123d3c91c303d77702b392b7ac136312eb0b7ec2 /drivers/char/tpm/tpm_atmel.c
parent700d8bdcd0fa815b08638b1e4d43b66d60cc6a8d (diff)
downloadlinux-3122a88a242454efe72930e56a3e4d56ee534f3c.tar.gz
[PATCH] tpm: Fix concerns with TPM driver -- use enums
Convert #defines to named enums where that preference has been indicated by other kernel developers. Signed-off-by: Kylene Hall <kjhall@us.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/char/tpm/tpm_atmel.c')
-rw-r--r--drivers/char/tpm/tpm_atmel.c21
1 files changed, 13 insertions, 8 deletions
diff --git a/drivers/char/tpm/tpm_atmel.c b/drivers/char/tpm/tpm_atmel.c
index f9333e729b623..3271391892e87 100644
--- a/drivers/char/tpm/tpm_atmel.c
+++ b/drivers/char/tpm/tpm_atmel.c
@@ -22,17 +22,22 @@
#include "tpm.h"
/* Atmel definitions */
-#define TPM_ATML_BASE 0x400
+enum tpm_atmel_addr{
+ TPM_ATML_BASE = 0x400
+};
/* write status bits */
-#define ATML_STATUS_ABORT 0x01
-#define ATML_STATUS_LASTBYTE 0x04
-
+enum tpm_atmel_write_status {
+ ATML_STATUS_ABORT = 0x01,
+ ATML_STATUS_LASTBYTE = 0x04
+};
/* read status bits */
-#define ATML_STATUS_BUSY 0x01
-#define ATML_STATUS_DATA_AVAIL 0x02
-#define ATML_STATUS_REWRITE 0x04
-
+enum tpm_atmel_read_status {
+ ATML_STATUS_BUSY = 0x01,
+ ATML_STATUS_DATA_AVAIL = 0x02,
+ ATML_STATUS_REWRITE = 0x04,
+ ATML_STATUS_READY = 0x08
+};
static int tpm_atml_recv(struct tpm_chip *chip, u8 * buf, size_t count)
{