From 1d1915532b3fb0d08aed8b2d8af1c6ea40846782 Mon Sep 17 00:00:00 2001 From: Jarkko Sakkinen Date: Wed, 25 Jan 2017 16:47:39 +0200 Subject: 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 Reviewed-by: Jason Gunthorpe --- drivers/char/tpm/tpm_nsc.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'drivers/char/tpm/tpm_nsc.c') diff --git a/drivers/char/tpm/tpm_nsc.c b/drivers/char/tpm/tpm_nsc.c index 9ff0e072c476..5d6cce74cd3f 100644 --- a/drivers/char/tpm/tpm_nsc.c +++ b/drivers/char/tpm/tpm_nsc.c @@ -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; -- cgit v1.2.3