22 #include <linux/export.h>
28 unsigned short mode,
void **file_private_data)
33 if (opl4->memory_access) {
37 opl4->memory_access++;
43 unsigned short mode,
void *file_private_data)
48 opl4->memory_access--;
54 void *file_private_data,
55 struct file *
file,
char __user *_buf,
74 void *file_private_data,
76 const char __user *_buf,
77 size_t count, loff_t pos)
95 .
open = snd_opl4_mem_proc_open,
96 .release = snd_opl4_mem_proc_release,
97 .read = snd_opl4_mem_proc_read,
98 .write = snd_opl4_mem_proc_write,
101 int snd_opl4_create_proc(
struct snd_opl4 *opl4)
105 entry = snd_info_create_card_entry(opl4->
card,
"opl4-mem", opl4->
card->proc_root);
110 entry->
size = 4 * 1024 * 1024;
113 entry->
size = 1 * 1024 * 1024;
116 entry->
c.
ops = &snd_opl4_mem_proc_ops;
119 if (snd_info_register(entry) < 0) {
120 snd_info_free_entry(entry);
124 opl4->proc_entry =
entry;
128 void snd_opl4_free_proc(
struct snd_opl4 *opl4)
130 snd_info_free_entry(opl4->proc_entry);