.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
---|
1 | 2 | /* |
---|
2 | 3 | * ISA Plug & Play support |
---|
3 | 4 | * Copyright (c) by Jaroslav Kysela <perex@perex.cz> |
---|
4 | | - * |
---|
5 | | - * This program is free software; you can redistribute it and/or modify |
---|
6 | | - * it under the terms of the GNU General Public License as published by |
---|
7 | | - * the Free Software Foundation; either version 2 of the License, or |
---|
8 | | - * (at your option) any later version. |
---|
9 | | - * |
---|
10 | | - * This program is distributed in the hope that it will be useful, |
---|
11 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
12 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
13 | | - * GNU General Public License for more details. |
---|
14 | | - * |
---|
15 | | - * You should have received a copy of the GNU General Public License |
---|
16 | | - * along with this program; if not, write to the Free Software |
---|
17 | | - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
---|
18 | 5 | */ |
---|
19 | 6 | |
---|
20 | 7 | #include <linux/module.h> |
---|
.. | .. |
---|
47 | 34 | nbytes = size - pos; |
---|
48 | 35 | cnt = nbytes; |
---|
49 | 36 | |
---|
50 | | - if (!access_ok(VERIFY_WRITE, buf, cnt)) |
---|
| 37 | + if (!access_ok(buf, cnt)) |
---|
51 | 38 | return -EINVAL; |
---|
52 | 39 | |
---|
53 | 40 | isapnp_cfg_begin(dev->card->number, dev->number); |
---|
.. | .. |
---|
62 | 49 | return nbytes; |
---|
63 | 50 | } |
---|
64 | 51 | |
---|
65 | | -static const struct file_operations isapnp_proc_bus_file_operations = { |
---|
66 | | - .owner = THIS_MODULE, |
---|
67 | | - .llseek = isapnp_proc_bus_lseek, |
---|
68 | | - .read = isapnp_proc_bus_read, |
---|
| 52 | +static const struct proc_ops isapnp_proc_bus_proc_ops = { |
---|
| 53 | + .proc_lseek = isapnp_proc_bus_lseek, |
---|
| 54 | + .proc_read = isapnp_proc_bus_read, |
---|
69 | 55 | }; |
---|
70 | 56 | |
---|
71 | 57 | static int isapnp_proc_attach_device(struct pnp_dev *dev) |
---|
.. | .. |
---|
82 | 68 | } |
---|
83 | 69 | sprintf(name, "%02x", dev->number); |
---|
84 | 70 | e = dev->procent = proc_create_data(name, S_IFREG | S_IRUGO, de, |
---|
85 | | - &isapnp_proc_bus_file_operations, dev); |
---|
| 71 | + &isapnp_proc_bus_proc_ops, dev); |
---|
86 | 72 | if (!e) |
---|
87 | 73 | return -ENOMEM; |
---|
88 | 74 | proc_set_size(e, 256); |
---|