TPM: sysfs functions consolidation
authorRajiv Andrade <srajiv@linux.vnet.ibm.com>
Mon, 2 Feb 2009 17:23:43 +0000 (15:23 -0200)
committerJames Morris <jmorris@namei.org>
Tue, 3 Feb 2009 00:23:09 +0000 (11:23 +1100)
commit0883743825e34b81f3ff78aaee3a97cba57586c5
tree9b9e7f2d4dca611aee61c7c0245956f5fd830d91
parentfaa3aad75a959f55e7783f4dc7840253c7506571
TPM: sysfs functions consolidation

According to Dave Hansen's comments on the tpm_show_*, some of these functions
present a pattern when allocating data[] memory space and also when setting its
content. A new function was created so that this pattern could be consolidated.
Also, replaced the data[] command vectors and its indexes by meaningful structures
as pointed out by Matt Helsley too.

Signed-off-by: Rajiv Andrade <srajiv@linux.vnet.ibm.com>
Signed-off-by: James Morris <jmorris@namei.org>
drivers/char/tpm/tpm.c
drivers/char/tpm/tpm.h