| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0 |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Copyright (C) 2002 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com) |
|---|
| 3 | | - * Licensed under the GPL |
|---|
| 4 | 4 | */ |
|---|
| 5 | 5 | |
|---|
| 6 | 6 | #include <linux/ctype.h> |
|---|
| .. | .. |
|---|
| 55 | 55 | return count; |
|---|
| 56 | 56 | } |
|---|
| 57 | 57 | |
|---|
| 58 | | -static const struct file_operations exitcode_proc_fops = { |
|---|
| 59 | | - .owner = THIS_MODULE, |
|---|
| 60 | | - .open = exitcode_proc_open, |
|---|
| 61 | | - .read = seq_read, |
|---|
| 62 | | - .llseek = seq_lseek, |
|---|
| 63 | | - .release = single_release, |
|---|
| 64 | | - .write = exitcode_proc_write, |
|---|
| 58 | +static const struct proc_ops exitcode_proc_ops = { |
|---|
| 59 | + .proc_open = exitcode_proc_open, |
|---|
| 60 | + .proc_read = seq_read, |
|---|
| 61 | + .proc_lseek = seq_lseek, |
|---|
| 62 | + .proc_release = single_release, |
|---|
| 63 | + .proc_write = exitcode_proc_write, |
|---|
| 65 | 64 | }; |
|---|
| 66 | 65 | |
|---|
| 67 | 66 | static int make_proc_exitcode(void) |
|---|
| 68 | 67 | { |
|---|
| 69 | 68 | struct proc_dir_entry *ent; |
|---|
| 70 | 69 | |
|---|
| 71 | | - ent = proc_create("exitcode", 0600, NULL, &exitcode_proc_fops); |
|---|
| 70 | + ent = proc_create("exitcode", 0600, NULL, &exitcode_proc_ops); |
|---|
| 72 | 71 | if (ent == NULL) { |
|---|
| 73 | 72 | printk(KERN_WARNING "make_proc_exitcode : Failed to register " |
|---|
| 74 | 73 | "/proc/exitcode\n"); |
|---|