hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
kernel/drivers/char/tpm/tpm-dev.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Copyright (C) 2004 IBM Corporation
34 * Authors:
....@@ -10,12 +11,6 @@
1011 * Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
1112 *
1213 * Device file system interface to the TPM
13
- *
14
- * This program is free software; you can redistribute it and/or
15
- * modify it under the terms of the GNU General Public License as
16
- * published by the Free Software Foundation, version 2 of the
17
- * License.
18
- *
1914 */
2015 #include <linux/slab.h>
2116 #include "tpm-dev.h"
....@@ -39,19 +34,13 @@
3934 if (priv == NULL)
4035 goto out;
4136
42
- tpm_common_open(file, chip, priv);
37
+ tpm_common_open(file, chip, priv, NULL);
4338
4439 return 0;
4540
4641 out:
4742 clear_bit(0, &chip->is_open);
4843 return -ENOMEM;
49
-}
50
-
51
-static ssize_t tpm_write(struct file *file, const char __user *buf,
52
- size_t size, loff_t *off)
53
-{
54
- return tpm_common_write(file, buf, size, off, NULL);
5544 }
5645
5746 /*
....@@ -73,6 +62,7 @@
7362 .llseek = no_llseek,
7463 .open = tpm_open,
7564 .read = tpm_common_read,
76
- .write = tpm_write,
65
+ .write = tpm_common_write,
66
+ .poll = tpm_common_poll,
7767 .release = tpm_release,
7868 };