]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
tpm: remove tpm_read_index and tpm_write_index from tpm.h
authorJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Wed, 25 Jan 2017 14:47:39 +0000 (16:47 +0200)
committerJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Fri, 3 Feb 2017 20:03:14 +0000 (22:03 +0200)
These are non-generic functions and do not belong to tpm.h.

Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Reviewed-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
drivers/char/tpm/tpm.h
drivers/char/tpm/tpm_atmel.h
drivers/char/tpm/tpm_nsc.c

index 7216bd78b643bb6f2c79449474a67984664f87fc..244fcffdab6b6a8f9b652317d419fe6b68c6dc51 100644 (file)
@@ -195,17 +195,6 @@ struct tpm_chip {
 
 #define to_tpm_chip(d) container_of(d, struct tpm_chip, dev)
 
-static inline int tpm_read_index(int base, int index)
-{
-       outb(index, base);
-       return inb(base+1) & 0xFF;
-}
-
-static inline void tpm_write_index(int base, int index, int value)
-{
-       outb(index, base);
-       outb(value & 0xFF, base+1);
-}
 struct tpm_input_header {
        __be16  tag;
        __be32  length;
index 4f96d80cdce997f1a031a323b70ba60d6b1d0954..5c82eb47665e0783ca07a444ec7b2ba659127da4 100644 (file)
@@ -96,6 +96,12 @@ enum tpm_atmel_addr {
        TPM_ATMEL_BASE_ADDR_HI = 0x09
 };
 
+static inline int tpm_read_index(int base, int index)
+{
+       outb(index, base);
+       return inb(base+1) & 0xFF;
+}
+
 /* Verify this is a 1.1 Atmel TPM */
 static int atmel_verify_tpm11(void)
 {
index 9ff0e072c4760a12d637fd9914cef50f43ddc18c..5d6cce74cd3fa3e7f71cf207454dd1e5e492e560 100644 (file)
@@ -278,6 +278,18 @@ static struct platform_driver nsc_drv = {
        },
 };
 
+static inline int tpm_read_index(int base, int index)
+{
+       outb(index, base);
+       return inb(base+1) & 0xFF;
+}
+
+static inline void tpm_write_index(int base, int index, int value)
+{
+       outb(index, base);
+       outb(value & 0xFF, base+1);
+}
+
 static int __init init_nsc(void)
 {
        int rc = 0;