diff options
author | Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> | 2016-03-23 07:16:09 +0100 |
---|---|---|
committer | Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> | 2016-06-25 16:26:35 +0200 |
commit | ee1779840d093ebf6893c97115422fb5171b54d7 (patch) | |
tree | 68f96928bc837f7992fd8395c6b4c923e4db86a9 /drivers/char/tpm/tpm_atmel.h | |
parent | tpm: drop manufacturer_id from struct tpm_vendor_specific (diff) | |
download | linux-ee1779840d093ebf6893c97115422fb5171b54d7.tar.xz linux-ee1779840d093ebf6893c97115422fb5171b54d7.zip |
tpm: drop 'base' from struct tpm_vendor_specific
Dropped the field 'base' from struct tpm_vendor_specific and migrated
it to the private structures of tpm_atmel and tpm_nsc.
Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Reviewed-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Diffstat (limited to 'drivers/char/tpm/tpm_atmel.h')
-rw-r--r-- | drivers/char/tpm/tpm_atmel.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/char/tpm/tpm_atmel.h b/drivers/char/tpm/tpm_atmel.h index 3fd929de9739..bced6780afe8 100644 --- a/drivers/char/tpm/tpm_atmel.h +++ b/drivers/char/tpm/tpm_atmel.h @@ -25,8 +25,14 @@ struct tpm_atmel_priv { int region_size; int have_region; + unsigned long base; }; +static inline struct tpm_atmel_priv *atmel_get_priv(struct tpm_chip *chip) +{ + return chip->vendor.priv; +} + #ifdef CONFIG_PPC64 #include <asm/prom.h> @@ -83,8 +89,9 @@ static void __iomem * atmel_get_base_addr(unsigned long *base, int *region_size) return ioremap(*base, *region_size); } #else -#define atmel_getb(chip, offset) inb(chip->vendor->base + offset) -#define atmel_putb(val, chip, offset) outb(val, chip->vendor->base + offset) +#define atmel_getb(chip, offset) inb(atmel_get_priv(chip)->base + offset) +#define atmel_putb(val, chip, offset) \ + outb(val, atmel_get_priv(chip)->base + offset) #define atmel_request_region request_region #define atmel_release_region release_region /* Atmel definitions */ |