.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
---|
1 | 2 | /* |
---|
2 | 3 | * 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. |
---|
8 | 4 | * |
---|
9 | 5 | * scan-log-data driver for PPC64 Todd Inglett <tinglett@vnet.ibm.com> |
---|
10 | 6 | * |
---|
.. | .. |
---|
63 | 59 | return -EINVAL; |
---|
64 | 60 | } |
---|
65 | 61 | |
---|
66 | | - if (!access_ok(VERIFY_WRITE, buf, count)) |
---|
| 62 | + if (!access_ok(buf, count)) |
---|
67 | 63 | return -EFAULT; |
---|
68 | 64 | |
---|
69 | 65 | for (;;) { |
---|
.. | .. |
---|
156 | 152 | return 0; |
---|
157 | 153 | } |
---|
158 | 154 | |
---|
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, |
---|
166 | 161 | }; |
---|
167 | 162 | |
---|
168 | 163 | static int __init scanlog_init(void) |
---|
.. | .. |
---|
180 | 175 | goto err; |
---|
181 | 176 | |
---|
182 | 177 | ent = proc_create("powerpc/rtas/scan-log-dump", 0400, NULL, |
---|
183 | | - &scanlog_fops); |
---|
| 178 | + &scanlog_proc_ops); |
---|
184 | 179 | if (!ent) |
---|
185 | 180 | goto err; |
---|
186 | 181 | return 0; |
---|