.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * Copyright (C) 2004 IBM Corporation |
---|
3 | 4 | * Authors: |
---|
.. | .. |
---|
10 | 11 | * Jason Gunthorpe <jgunthorpe@obsidianresearch.com> |
---|
11 | 12 | * |
---|
12 | 13 | * 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 | | - * |
---|
19 | 14 | */ |
---|
20 | 15 | #include <linux/slab.h> |
---|
21 | 16 | #include "tpm-dev.h" |
---|
.. | .. |
---|
39 | 34 | if (priv == NULL) |
---|
40 | 35 | goto out; |
---|
41 | 36 | |
---|
42 | | - tpm_common_open(file, chip, priv); |
---|
| 37 | + tpm_common_open(file, chip, priv, NULL); |
---|
43 | 38 | |
---|
44 | 39 | return 0; |
---|
45 | 40 | |
---|
46 | 41 | out: |
---|
47 | 42 | clear_bit(0, &chip->is_open); |
---|
48 | 43 | 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); |
---|
55 | 44 | } |
---|
56 | 45 | |
---|
57 | 46 | /* |
---|
.. | .. |
---|
73 | 62 | .llseek = no_llseek, |
---|
74 | 63 | .open = tpm_open, |
---|
75 | 64 | .read = tpm_common_read, |
---|
76 | | - .write = tpm_write, |
---|
| 65 | + .write = tpm_common_write, |
---|
| 66 | + .poll = tpm_common_poll, |
---|
77 | 67 | .release = tpm_release, |
---|
78 | 68 | }; |
---|