| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Sample dynamic sized record fifo implementation |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * Copyright (C) 2010 Stefani Seibold <stefani@seibold.net> |
|---|
| 5 | | - * |
|---|
| 6 | | - * Released under the GPL version 2 only. |
|---|
| 7 | | - * |
|---|
| 8 | 6 | */ |
|---|
| 9 | 7 | |
|---|
| 10 | 8 | #include <linux/init.h> |
|---|
| .. | .. |
|---|
| 155 | 153 | return copied; |
|---|
| 156 | 154 | } |
|---|
| 157 | 155 | |
|---|
| 158 | | -static const struct file_operations fifo_fops = { |
|---|
| 159 | | - .owner = THIS_MODULE, |
|---|
| 160 | | - .read = fifo_read, |
|---|
| 161 | | - .write = fifo_write, |
|---|
| 162 | | - .llseek = noop_llseek, |
|---|
| 156 | +static const struct proc_ops fifo_proc_ops = { |
|---|
| 157 | + .proc_read = fifo_read, |
|---|
| 158 | + .proc_write = fifo_write, |
|---|
| 159 | + .proc_lseek = noop_llseek, |
|---|
| 163 | 160 | }; |
|---|
| 164 | 161 | |
|---|
| 165 | 162 | static int __init example_init(void) |
|---|
| .. | .. |
|---|
| 182 | 179 | return -EIO; |
|---|
| 183 | 180 | } |
|---|
| 184 | 181 | |
|---|
| 185 | | - if (proc_create(PROC_FIFO, 0, NULL, &fifo_fops) == NULL) { |
|---|
| 182 | + if (proc_create(PROC_FIFO, 0, NULL, &fifo_proc_ops) == NULL) { |
|---|
| 186 | 183 | #ifdef DYNAMIC |
|---|
| 187 | 184 | kfifo_free(&test); |
|---|
| 188 | 185 | #endif |
|---|