hc
2024-05-10 748e4f3d702def1a4bff191e0cf93b6a05340f01
kernel/arch/sparc/kernel/led.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 #include <linux/kernel.h>
23 #include <linux/module.h>
34 #include <linux/init.h>
....@@ -49,6 +50,7 @@
4950 add_timer(&led_blink_timer);
5051 }
5152
53
+#ifdef CONFIG_PROC_FS
5254 static int led_proc_show(struct seq_file *m, void *v)
5355 {
5456 if (get_auxio() & AUXIO_LED)
....@@ -103,14 +105,14 @@
103105 return count;
104106 }
105107
106
-static const struct file_operations led_proc_fops = {
107
- .owner = THIS_MODULE,
108
- .open = led_proc_open,
109
- .read = seq_read,
110
- .llseek = seq_lseek,
111
- .release = single_release,
112
- .write = led_proc_write,
108
+static const struct proc_ops led_proc_ops = {
109
+ .proc_open = led_proc_open,
110
+ .proc_read = seq_read,
111
+ .proc_lseek = seq_lseek,
112
+ .proc_release = single_release,
113
+ .proc_write = led_proc_write,
113114 };
115
+#endif
114116
115117 static struct proc_dir_entry *led;
116118
....@@ -120,7 +122,7 @@
120122 {
121123 timer_setup(&led_blink_timer, led_blink, 0);
122124
123
- led = proc_create("led", 0, NULL, &led_proc_fops);
125
+ led = proc_create("led", 0, NULL, &led_proc_ops);
124126 if (!led)
125127 return -ENOMEM;
126128