*
*/
#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>
/* 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)
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 *);