Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

tpm: remove tpm_read_index and tpm_write_index from tpm.h

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>

+18 -11
-11
drivers/char/tpm/tpm.h
··· 195 195 196 196 #define to_tpm_chip(d) container_of(d, struct tpm_chip, dev) 197 197 198 - static inline int tpm_read_index(int base, int index) 199 - { 200 - outb(index, base); 201 - return inb(base+1) & 0xFF; 202 - } 203 - 204 - static inline void tpm_write_index(int base, int index, int value) 205 - { 206 - outb(index, base); 207 - outb(value & 0xFF, base+1); 208 - } 209 198 struct tpm_input_header { 210 199 __be16 tag; 211 200 __be32 length;
+6
drivers/char/tpm/tpm_atmel.h
··· 96 96 TPM_ATMEL_BASE_ADDR_HI = 0x09 97 97 }; 98 98 99 + static inline int tpm_read_index(int base, int index) 100 + { 101 + outb(index, base); 102 + return inb(base+1) & 0xFF; 103 + } 104 + 99 105 /* Verify this is a 1.1 Atmel TPM */ 100 106 static int atmel_verify_tpm11(void) 101 107 {
+12
drivers/char/tpm/tpm_nsc.c
··· 278 278 }, 279 279 }; 280 280 281 + static inline int tpm_read_index(int base, int index) 282 + { 283 + outb(index, base); 284 + return inb(base+1) & 0xFF; 285 + } 286 + 287 + static inline void tpm_write_index(int base, int index, int value) 288 + { 289 + outb(index, base); 290 + outb(value & 0xFF, base+1); 291 + } 292 + 281 293 static int __init init_nsc(void) 282 294 { 283 295 int rc = 0;