hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
kernel/arch/alpha/kernel/srm_env.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * srm_env.c - Access to SRM environment
34 * variables through linux' procfs
....@@ -9,23 +10,6 @@
910 * <J.A.K.Mouw@its.tudelft.nl>. It is based on an idea
1011 * provided by DEC^WCompaq^WIntel's "Jumpstart" CD. They
1112 * included a patch like this as well. Thanks for idea!
12
- *
13
- * This program is free software; you can redistribute
14
- * it and/or modify it under the terms of the GNU General
15
- * Public License version 2 as published by the Free Software
16
- * Foundation.
17
- *
18
- * This program is distributed in the hope that it will be
19
- * useful, but WITHOUT ANY WARRANTY; without even the implied
20
- * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
21
- * PURPOSE. See the GNU General Public License for more
22
- * details.
23
- *
24
- * You should have received a copy of the GNU General Public
25
- * License along with this program; if not, write to the
26
- * Free Software Foundation, Inc., 59 Temple Place,
27
- * Suite 330, Boston, MA 02111-1307 USA
28
- *
2913 */
3014
3115 #include <linux/kernel.h>
....@@ -135,13 +119,12 @@
135119 return res;
136120 }
137121
138
-static const struct file_operations srm_env_proc_fops = {
139
- .owner = THIS_MODULE,
140
- .open = srm_env_proc_open,
141
- .read = seq_read,
142
- .llseek = seq_lseek,
143
- .release = single_release,
144
- .write = srm_env_proc_write,
122
+static const struct proc_ops srm_env_proc_ops = {
123
+ .proc_open = srm_env_proc_open,
124
+ .proc_read = seq_read,
125
+ .proc_lseek = seq_lseek,
126
+ .proc_release = single_release,
127
+ .proc_write = srm_env_proc_write,
145128 };
146129
147130 static int __init
....@@ -198,7 +181,7 @@
198181 entry = srm_named_entries;
199182 while (entry->name && entry->id) {
200183 if (!proc_create_data(entry->name, 0644, named_dir,
201
- &srm_env_proc_fops, (void *)entry->id))
184
+ &srm_env_proc_ops, (void *)entry->id))
202185 goto cleanup;
203186 entry++;
204187 }
....@@ -210,7 +193,7 @@
210193 char name[4];
211194 sprintf(name, "%ld", var_num);
212195 if (!proc_create_data(name, 0644, numbered_dir,
213
- &srm_env_proc_fops, (void *)var_num))
196
+ &srm_env_proc_ops, (void *)var_num))
214197 goto cleanup;
215198 }
216199