hc
2023-12-09 b22da3d8526a935aa31e086e63f60ff3246cb61c
kernel/drivers/char/tpm/tpm_i2c_atmel.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * ATMEL I2C TPM AT97SC3204T
34 *
....@@ -13,19 +14,6 @@
1314 *
1415 * TGC status/locality/etc functions seen in the LPC implementation do not
1516 * seem to be present.
16
- *
17
- * This program is free software: you can redistribute it and/or modify
18
- * it under the terms of the GNU General Public License as published by
19
- * the Free Software Foundation, either version 2 of the License, or
20
- * (at your option) any later version.
21
- *
22
- * This program is distributed in the hope that it will be useful,
23
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
24
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25
- * GNU General Public License for more details.
26
- *
27
- * You should have received a copy of the GNU General Public License
28
- * along with this program. If not, see http://www.gnu.org/licenses/>.
2917 */
3018 #include <linux/init.h>
3119 #include <linux/module.h>
....@@ -46,7 +34,7 @@
4634 /* This is the amount we read on the first try. 25 was chosen to fit a
4735 * fair number of read responses in the buffer so a 2nd retry can be
4836 * avoided in small message cases. */
49
- u8 buffer[sizeof(struct tpm_output_header) + 25];
37
+ u8 buffer[sizeof(struct tpm_header) + 25];
5038 };
5139
5240 static int i2c_atmel_send(struct tpm_chip *chip, u8 *buf, size_t len)
....@@ -80,8 +68,7 @@
8068 {
8169 struct priv_data *priv = dev_get_drvdata(&chip->dev);
8270 struct i2c_client *client = to_i2c_client(chip->dev.parent);
83
- struct tpm_output_header *hdr =
84
- (struct tpm_output_header *)priv->buffer;
71
+ struct tpm_header *hdr = (struct tpm_header *)priv->buffer;
8572 u32 expected_len;
8673 int rc;
8774