diff options
author | Mimi Zohar <zohar@linux.vnet.ibm.com> | 2010-11-24 01:50:32 +0300 |
---|---|---|
committer | James Morris <jmorris@namei.org> | 2010-11-29 00:55:19 +0300 |
commit | a0e39349d80d8b5deeb264fb190bd064f7063252 (patch) | |
tree | 51269aaf15b299c2afcb1bb53bf95580769fc22a /drivers/char/tpm/tpm.h | |
parent | dc88e46029486ed475c71fe1bb696d39511ac8fe (diff) | |
download | linux-a0e39349d80d8b5deeb264fb190bd064f7063252.tar.xz |
tpm: add module_put wrapper
For readability, define a tpm_chip_put() wrapper to call module_put().
Replace existing module_put() calls with the wrapper.
(Change based on trusted/encrypted patchset review by David Howells.)
Signed-off-by: Mimi Zohar <zohar@us.ibm.com>
Signed-off-by: David Safford <safford@watson.ibm.com>
Acked-by: David Howells <dhowells@redhat.com>
Acked-by: Serge E. Hallyn <serge.hallyn@canonical.com>
Signed-off-by: James Morris <jmorris@namei.org>
Diffstat (limited to 'drivers/char/tpm/tpm.h')
-rw-r--r-- | drivers/char/tpm/tpm.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/char/tpm/tpm.h b/drivers/char/tpm/tpm.h index 792868d24f2a..72ddb031b69a 100644 --- a/drivers/char/tpm/tpm.h +++ b/drivers/char/tpm/tpm.h @@ -113,6 +113,11 @@ struct tpm_chip { #define to_tpm_chip(n) container_of(n, struct tpm_chip, vendor) +static inline void tpm_chip_put(struct tpm_chip *chip) +{ + module_put(chip->dev->driver->owner); +} + static inline int tpm_read_index(int base, int index) { outb(index, base); |