From b22da3d8526a935aa31e086e63f60ff3246cb61c Mon Sep 17 00:00:00 2001 From: hc <hc@nodka.com> Date: Sat, 09 Dec 2023 07:24:11 +0000 Subject: [PATCH] add stmac read mac form eeprom --- kernel/drivers/char/tpm/tpm-dev.c | 18 ++++-------------- 1 files changed, 4 insertions(+), 14 deletions(-) diff --git a/kernel/drivers/char/tpm/tpm-dev.c b/kernel/drivers/char/tpm/tpm-dev.c index ebd74ab..e2c0baa 100644 --- a/kernel/drivers/char/tpm/tpm-dev.c +++ b/kernel/drivers/char/tpm/tpm-dev.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0-only /* * Copyright (C) 2004 IBM Corporation * Authors: @@ -10,12 +11,6 @@ * Jason Gunthorpe <jgunthorpe@obsidianresearch.com> * * Device file system interface to the TPM - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation, version 2 of the - * License. - * */ #include <linux/slab.h> #include "tpm-dev.h" @@ -39,19 +34,13 @@ if (priv == NULL) goto out; - tpm_common_open(file, chip, priv); + tpm_common_open(file, chip, priv, NULL); return 0; out: clear_bit(0, &chip->is_open); return -ENOMEM; -} - -static ssize_t tpm_write(struct file *file, const char __user *buf, - size_t size, loff_t *off) -{ - return tpm_common_write(file, buf, size, off, NULL); } /* @@ -73,6 +62,7 @@ .llseek = no_llseek, .open = tpm_open, .read = tpm_common_read, - .write = tpm_write, + .write = tpm_common_write, + .poll = tpm_common_poll, .release = tpm_release, }; -- Gitblit v1.6.2