hc
2023-12-06 08f87f769b595151be1afeff53e144f543faa614
kernel/drivers/parisc/led.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * Chassis LCD/LED driver for HP-PARISC workstations
34 *
....@@ -5,11 +6,6 @@
56 * (c) Copyright 2000 Helge Deller <hdeller@redhat.com>
67 * (c) Copyright 2001-2009 Helge Deller <deller@gmx.de>
78 * (c) Copyright 2001 Randolph Chung <tausq@debian.org>
8
- *
9
- * This program is free software; you can redistribute it and/or modify
10
- * it under the terms of the GNU General Public License as published by
11
- * the Free Software Foundation; either version 2 of the License, or
12
- * (at your option) any later version.
139 *
1410 * TODO:
1511 * - speed-up calculations with inlined assembler
....@@ -234,13 +230,12 @@
234230 return -EINVAL;
235231 }
236232
237
-static const struct file_operations led_proc_fops = {
238
- .owner = THIS_MODULE,
239
- .open = led_proc_open,
240
- .read = seq_read,
241
- .llseek = seq_lseek,
242
- .release = single_release,
243
- .write = led_proc_write,
233
+static const struct proc_ops led_proc_ops = {
234
+ .proc_open = led_proc_open,
235
+ .proc_read = seq_read,
236
+ .proc_lseek = seq_lseek,
237
+ .proc_release = single_release,
238
+ .proc_write = led_proc_write,
244239 };
245240
246241 static int __init led_create_procfs(void)
....@@ -256,14 +251,14 @@
256251 if (!lcd_no_led_support)
257252 {
258253 ent = proc_create_data("led", S_IRUGO|S_IWUSR, proc_pdc_root,
259
- &led_proc_fops, (void *)LED_NOLCD); /* LED */
254
+ &led_proc_ops, (void *)LED_NOLCD); /* LED */
260255 if (!ent) return -1;
261256 }
262257
263258 if (led_type == LED_HASLCD)
264259 {
265260 ent = proc_create_data("lcd", S_IRUGO|S_IWUSR, proc_pdc_root,
266
- &led_proc_fops, (void *)LED_HASLCD); /* LCD */
261
+ &led_proc_ops, (void *)LED_HASLCD); /* LCD */
267262 if (!ent) return -1;
268263 }
269264