hc
2024-01-03 2f7c68cb55ecb7331f2381deb497c27155f32faf
kernel/arch/powerpc/platforms/pseries/scanlog.c
....@@ -1,10 +1,6 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * c 2001 PPC 64 Team, IBM Corp
3
- *
4
- * This program is free software; you can redistribute it and/or
5
- * modify it under the terms of the GNU General Public License
6
- * as published by the Free Software Foundation; either version
7
- * 2 of the License, or (at your option) any later version.
84 *
95 * scan-log-data driver for PPC64 Todd Inglett <tinglett@vnet.ibm.com>
106 *
....@@ -63,7 +59,7 @@
6359 return -EINVAL;
6460 }
6561
66
- if (!access_ok(VERIFY_WRITE, buf, count))
62
+ if (!access_ok(buf, count))
6763 return -EFAULT;
6864
6965 for (;;) {
....@@ -156,13 +152,12 @@
156152 return 0;
157153 }
158154
159
-static const struct file_operations scanlog_fops = {
160
- .owner = THIS_MODULE,
161
- .read = scanlog_read,
162
- .write = scanlog_write,
163
- .open = scanlog_open,
164
- .release = scanlog_release,
165
- .llseek = noop_llseek,
155
+static const struct proc_ops scanlog_proc_ops = {
156
+ .proc_read = scanlog_read,
157
+ .proc_write = scanlog_write,
158
+ .proc_open = scanlog_open,
159
+ .proc_release = scanlog_release,
160
+ .proc_lseek = noop_llseek,
166161 };
167162
168163 static int __init scanlog_init(void)
....@@ -180,7 +175,7 @@
180175 goto err;
181176
182177 ent = proc_create("powerpc/rtas/scan-log-dump", 0400, NULL,
183
- &scanlog_fops);
178
+ &scanlog_proc_ops);
184179 if (!ent)
185180 goto err;
186181 return 0;