@@ -193,11 +193,6 @@ struct file {
struct evtchn_port_list ports;
} evtchn;
struct gntmap gntmap;
-#ifdef CONFIG_TPM_TIS
- struct {
- struct tpm_chip *dev;
- } tpm_tis;
-#endif
#ifdef CONFIG_XENBUS
struct {
/* To each xenbus FD is associated a queue of watch events for this
@@ -468,7 +468,7 @@ int close(int fd)
#endif
#ifdef CONFIG_TPM_TIS
case FTYPE_TPM_TIS:
- shutdown_tpm_tis(files[fd].tpm_tis.dev);
+ shutdown_tpm_tis(files[fd].dev);
files[fd].type = FTYPE_NONE;
return 0;
#endif
@@ -1288,14 +1288,14 @@ int tpm_tis_open(struct tpm_chip* tpm)
tpm->fd = alloc_fd(FTYPE_TPM_TIS);
printk("tpm_tis_open() -> %d\n", tpm->fd);
- files[tpm->fd].tpm_tis.dev = tpm;
+ files[tpm->fd].dev = tpm;
return tpm->fd;
}
int tpm_tis_posix_write(int fd, const uint8_t* buf, size_t count)
{
struct tpm_chip* tpm;
- tpm = files[fd].tpm_tis.dev;
+ tpm = files[fd].dev;
if(tpm->locality < 0) {
printk("tpm_tis_posix_write() failed! locality not set!\n");
@@ -1323,7 +1323,7 @@ int tpm_tis_posix_read(int fd, uint8_t* buf, size_t count)
{
int rc;
struct tpm_chip* tpm;
- tpm = files[fd].tpm_tis.dev;
+ tpm = files[fd].dev;
if(count == 0) {
return 0;
@@ -1350,7 +1350,7 @@ int tpm_tis_posix_read(int fd, uint8_t* buf, size_t count)
int tpm_tis_posix_fstat(int fd, struct stat* buf)
{
struct tpm_chip* tpm;
- tpm = files[fd].tpm_tis.dev;
+ tpm = files[fd].dev;
buf->st_mode = O_RDWR;
buf->st_uid = 0;