aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/tpm/tpm.h
diff options
context:
space:
mode:
authorMatthias Kaehlcke <matthias.kaehlcke@gmail.com>2007-05-08 03:32:02 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-08 14:15:15 -0400
commitd081d470446900473f2f32b9203827809b8134f0 (patch)
tree82ea52ec3c101593779349b1c6c4ca507cdcfe56 /drivers/char/tpm/tpm.h
parent69f545ea6aa9cf0a1b2e31b287e17f4cd9eb6d93 (diff)
use mutex instead of semaphore in TPM driver
The TPM driver uses two semaphores as mutexes. Use the mutex API instead of the (binary) semaphores. Signed-off-by: Matthias Kaehlcke <matthias.kaehlcke@gmail.com> Cc: Kylene Hall <kjhall@us.ibm.com> Cc: Marcel Selhorst <tpm@selhorst.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/char/tpm/tpm.h')
-rw-r--r--drivers/char/tpm/tpm.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/char/tpm/tpm.h b/drivers/char/tpm/tpm.h
index 9f273f032b0f..b2e2b002a1bb 100644
--- a/drivers/char/tpm/tpm.h
+++ b/drivers/char/tpm/tpm.h
@@ -21,6 +21,7 @@
21#include <linux/module.h> 21#include <linux/module.h>
22#include <linux/delay.h> 22#include <linux/delay.h>
23#include <linux/fs.h> 23#include <linux/fs.h>
24#include <linux/mutex.h>
24#include <linux/sched.h> 25#include <linux/sched.h>
25#include <linux/miscdevice.h> 26#include <linux/miscdevice.h>
26#include <linux/platform_device.h> 27#include <linux/platform_device.h>
@@ -94,11 +95,11 @@ struct tpm_chip {
94 /* Data passed to and from the tpm via the read/write calls */ 95 /* Data passed to and from the tpm via the read/write calls */
95 u8 *data_buffer; 96 u8 *data_buffer;
96 atomic_t data_pending; 97 atomic_t data_pending;
97 struct semaphore buffer_mutex; 98 struct mutex buffer_mutex;
98 99
99 struct timer_list user_read_timer; /* user needs to claim result */ 100 struct timer_list user_read_timer; /* user needs to claim result */
100 struct work_struct work; 101 struct work_struct work;
101 struct semaphore tpm_mutex; /* tpm is processing */ 102 struct mutex tpm_mutex; /* tpm is processing */
102 103
103 struct tpm_vendor_specific vendor; 104 struct tpm_vendor_specific vendor;
104 105