- patches.apparmor/remove_suid_new_case_in_2.6.22.diff: Merge fix.
[linux-flexiantxendom0-3.2.10.git] / drivers / char / tpm / tpm.h
index 6635c03..b2e2b00 100644 (file)
@@ -19,9 +19,9 @@
  * 
  */
 #include <linux/module.h>
-#include <linux/pci.h>
 #include <linux/delay.h>
 #include <linux/fs.h>
+#include <linux/mutex.h>
 #include <linux/sched.h>
 #include <linux/miscdevice.h>
 #include <linux/platform_device.h>
@@ -95,20 +95,17 @@ struct tpm_chip {
        /* Data passed to and from the tpm via the read/write calls */
        u8 *data_buffer;
        atomic_t data_pending;
-       struct semaphore buffer_mutex;
+       struct mutex buffer_mutex;
 
        struct timer_list user_read_timer;      /* user needs to claim result */
        struct work_struct work;
-       struct semaphore tpm_mutex;     /* tpm is processing */
+       struct mutex tpm_mutex; /* tpm is processing */
 
        struct tpm_vendor_specific vendor;
 
        struct dentry **bios_dir;
 
        struct list_head list;
-#ifdef CONFIG_XEN
-       void *priv;
-#endif
 };
 
 #define to_tpm_chip(n) container_of(n, struct tpm_chip, vendor)
@@ -125,18 +122,6 @@ static inline void tpm_write_index(int base, int index, int value)
        outb(value & 0xFF, base+1);
 }
 
-#ifdef CONFIG_XEN
-static inline void *chip_get_private(const struct tpm_chip *chip)
-{
-       return chip->priv;
-}
-
-static inline void chip_set_private(struct tpm_chip *chip, void *priv)
-{
-       chip->priv = priv;
-}
-#endif
-
 extern void tpm_get_timeouts(struct tpm_chip *);
 extern void tpm_gen_interrupt(struct tpm_chip *);
 extern void tpm_continue_selftest(struct tpm_chip *);