.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
---|
1 | 2 | /* |
---|
2 | 3 | * Chassis LCD/LED driver for HP-PARISC workstations |
---|
3 | 4 | * |
---|
.. | .. |
---|
5 | 6 | * (c) Copyright 2000 Helge Deller <hdeller@redhat.com> |
---|
6 | 7 | * (c) Copyright 2001-2009 Helge Deller <deller@gmx.de> |
---|
7 | 8 | * (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. |
---|
13 | 9 | * |
---|
14 | 10 | * TODO: |
---|
15 | 11 | * - speed-up calculations with inlined assembler |
---|
.. | .. |
---|
234 | 230 | return -EINVAL; |
---|
235 | 231 | } |
---|
236 | 232 | |
---|
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, |
---|
244 | 239 | }; |
---|
245 | 240 | |
---|
246 | 241 | static int __init led_create_procfs(void) |
---|
.. | .. |
---|
256 | 251 | if (!lcd_no_led_support) |
---|
257 | 252 | { |
---|
258 | 253 | 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 */ |
---|
260 | 255 | if (!ent) return -1; |
---|
261 | 256 | } |
---|
262 | 257 | |
---|
263 | 258 | if (led_type == LED_HASLCD) |
---|
264 | 259 | { |
---|
265 | 260 | 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 */ |
---|
267 | 262 | if (!ent) return -1; |
---|
268 | 263 | } |
---|
269 | 264 | |
---|