#include <linux/init.h>
#include <linux/module.h>
#include <linux/mutex.h>
#include <linux/compat.h>
#include <sound/core.h>
#include <sound/minors.h>
#include <sound/initval.h>
#include "seq_oss_device.h"
#include "seq_oss_synth.h"
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
MODULE_ALIAS_SNDRV_MINOR(…);
MODULE_ALIAS_SNDRV_MINOR(…);
static int register_device(void);
static void unregister_device(void);
#ifdef CONFIG_SND_PROC_FS
static int register_proc(void);
static void unregister_proc(void);
#else
static inline int register_proc(void) { return 0; }
static inline void unregister_proc(void) {}
#endif
static int odev_open(struct inode *inode, struct file *file);
static int odev_release(struct inode *inode, struct file *file);
static ssize_t odev_read(struct file *file, char __user *buf, size_t count, loff_t *offset);
static ssize_t odev_write(struct file *file, const char __user *buf, size_t count, loff_t *offset);
static long odev_ioctl(struct file *file, unsigned int cmd, unsigned long arg);
static __poll_t odev_poll(struct file *file, poll_table * wait);
static struct snd_seq_driver seq_oss_synth_driver = …;
static int __init alsa_seq_oss_init(void)
{ … }
static void __exit alsa_seq_oss_exit(void)
{ … }
module_init(…) …
module_exit(…)
static DEFINE_MUTEX(register_mutex);
static int
odev_open(struct inode *inode, struct file *file)
{ … }
static int
odev_release(struct inode *inode, struct file *file)
{ … }
static ssize_t
odev_read(struct file *file, char __user *buf, size_t count, loff_t *offset)
{ … }
static ssize_t
odev_write(struct file *file, const char __user *buf, size_t count, loff_t *offset)
{ … }
static long
odev_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
{ … }
#ifdef CONFIG_COMPAT
static long odev_ioctl_compat(struct file *file, unsigned int cmd,
unsigned long arg)
{ … }
#else
#define odev_ioctl_compat …
#endif
static __poll_t
odev_poll(struct file *file, poll_table * wait)
{ … }
static const struct file_operations seq_oss_f_ops = …;
static int __init
register_device(void)
{ … }
static void
unregister_device(void)
{ … }
#ifdef CONFIG_SND_PROC_FS
static struct snd_info_entry *info_entry;
static void
info_read(struct snd_info_entry *entry, struct snd_info_buffer *buf)
{ … }
static int __init
register_proc(void)
{ … }
static void
unregister_proc(void)
{ … }
#endif