diff options
Diffstat (limited to 'drivers/char/tpm')
-rw-r--r-- | drivers/char/tpm/tpm.c | 5 | ||||
-rw-r--r-- | drivers/char/tpm/tpm_bios.c | 4 |
2 files changed, 4 insertions, 5 deletions
diff --git a/drivers/char/tpm/tpm.c b/drivers/char/tpm/tpm.c index 33e1f66e39c..2f572b97c16 100644 --- a/drivers/char/tpm/tpm.c +++ b/drivers/char/tpm/tpm.c @@ -1107,9 +1107,8 @@ struct tpm_chip *tpm_register_hardware(struct device *dev, const struct tpm_vend INIT_WORK(&chip->work, timeout_work); - init_timer(&chip->user_read_timer); - chip->user_read_timer.function = user_reader_timeout; - chip->user_read_timer.data = (unsigned long) chip; + setup_timer(&chip->user_read_timer, user_reader_timeout, + (unsigned long)chip); memcpy(&chip->vendor, entry, sizeof(struct tpm_vendor_specific)); diff --git a/drivers/char/tpm/tpm_bios.c b/drivers/char/tpm/tpm_bios.c index 7fca5f470be..4eba32b23b2 100644 --- a/drivers/char/tpm/tpm_bios.c +++ b/drivers/char/tpm/tpm_bios.c @@ -441,7 +441,7 @@ static int tpm_ascii_bios_measurements_open(struct inode *inode, return err; } -struct file_operations tpm_ascii_bios_measurements_ops = { +const struct file_operations tpm_ascii_bios_measurements_ops = { .open = tpm_ascii_bios_measurements_open, .read = seq_read, .llseek = seq_lseek, @@ -474,7 +474,7 @@ static int tpm_binary_bios_measurements_open(struct inode *inode, return err; } -struct file_operations tpm_binary_bios_measurements_ops = { +const struct file_operations tpm_binary_bios_measurements_ops = { .open = tpm_binary_bios_measurements_open, .read = seq_read, .llseek = seq_lseek, |