| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * salinfo.c |
|---|
| 3 | 4 | * |
|---|
| .. | .. |
|---|
| 330 | 331 | return size; |
|---|
| 331 | 332 | } |
|---|
| 332 | 333 | |
|---|
| 333 | | -static const struct file_operations salinfo_event_fops = { |
|---|
| 334 | | - .open = salinfo_event_open, |
|---|
| 335 | | - .read = salinfo_event_read, |
|---|
| 336 | | - .llseek = noop_llseek, |
|---|
| 334 | +static const struct proc_ops salinfo_event_proc_ops = { |
|---|
| 335 | + .proc_open = salinfo_event_open, |
|---|
| 336 | + .proc_read = salinfo_event_read, |
|---|
| 337 | + .proc_lseek = noop_llseek, |
|---|
| 337 | 338 | }; |
|---|
| 338 | 339 | |
|---|
| 339 | 340 | static int |
|---|
| .. | .. |
|---|
| 533 | 534 | return count; |
|---|
| 534 | 535 | } |
|---|
| 535 | 536 | |
|---|
| 536 | | -static const struct file_operations salinfo_data_fops = { |
|---|
| 537 | | - .open = salinfo_log_open, |
|---|
| 538 | | - .release = salinfo_log_release, |
|---|
| 539 | | - .read = salinfo_log_read, |
|---|
| 540 | | - .write = salinfo_log_write, |
|---|
| 541 | | - .llseek = default_llseek, |
|---|
| 537 | +static const struct proc_ops salinfo_data_proc_ops = { |
|---|
| 538 | + .proc_open = salinfo_log_open, |
|---|
| 539 | + .proc_release = salinfo_log_release, |
|---|
| 540 | + .proc_read = salinfo_log_read, |
|---|
| 541 | + .proc_write = salinfo_log_write, |
|---|
| 542 | + .proc_lseek = default_llseek, |
|---|
| 542 | 543 | }; |
|---|
| 543 | 544 | |
|---|
| 544 | 545 | static int salinfo_cpu_online(unsigned int cpu) |
|---|
| .. | .. |
|---|
| 580 | 581 | * 'data' contains an integer that corresponds to the feature we're |
|---|
| 581 | 582 | * testing |
|---|
| 582 | 583 | */ |
|---|
| 583 | | -static int proc_salinfo_show(struct seq_file *m, void *v) |
|---|
| 584 | +static int __maybe_unused proc_salinfo_show(struct seq_file *m, void *v) |
|---|
| 584 | 585 | { |
|---|
| 585 | 586 | unsigned long data = (unsigned long)v; |
|---|
| 586 | 587 | seq_puts(m, (sal_platform_features & data) ? "1\n" : "0\n"); |
|---|
| .. | .. |
|---|
| 616 | 617 | continue; |
|---|
| 617 | 618 | |
|---|
| 618 | 619 | entry = proc_create_data("event", S_IRUSR, dir, |
|---|
| 619 | | - &salinfo_event_fops, data); |
|---|
| 620 | + &salinfo_event_proc_ops, data); |
|---|
| 620 | 621 | if (!entry) |
|---|
| 621 | 622 | continue; |
|---|
| 622 | 623 | *sdir++ = entry; |
|---|
| 623 | 624 | |
|---|
| 624 | 625 | entry = proc_create_data("data", S_IRUSR | S_IWUSR, dir, |
|---|
| 625 | | - &salinfo_data_fops, data); |
|---|
| 626 | + &salinfo_data_proc_ops, data); |
|---|
| 626 | 627 | if (!entry) |
|---|
| 627 | 628 | continue; |
|---|
| 628 | 629 | *sdir++ = entry; |
|---|