aboutsummaryrefslogtreecommitdiff
path: root/sound/core/pcm_native.c
diff options
context:
space:
mode:
authorClemens Ladisch <clemens@ladisch.de>2005-11-20 14:03:48 +0100
committerJaroslav Kysela <perex@suse.cz>2006-01-03 12:29:14 +0100
commit2af677fc884fc6dc79e65c99050ea607ac8bab9b (patch)
tree4291d36c2f116d5887b88da5f0213b68933a1201 /sound/core/pcm_native.c
parenta106cd3d9e88c8761bd0eac2ce402cc82bd11fea (diff)
[ALSA] dynamic minors (1/6): store device type in struct snd_minor
Instead of a comment string, store the device type in the snd_minor structure. This makes snd_minor more flexible, and has the nice side effect that we don't need anymore to create a separate snd_minor template for registering a device but can pass the file_operations directly to snd_register_device(). Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Diffstat (limited to 'sound/core/pcm_native.c')
-rw-r--r--sound/core/pcm_native.c53
1 files changed, 21 insertions, 32 deletions
diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c
index 7bac1cbe38d..bb40c016135 100644
--- a/sound/core/pcm_native.c
+++ b/sound/core/pcm_native.c
@@ -3370,40 +3370,29 @@ out:
* Register section
*/
-static struct file_operations snd_pcm_f_ops_playback = {
- .owner = THIS_MODULE,
- .write = snd_pcm_write,
- .writev = snd_pcm_writev,
- .open = snd_pcm_open,
- .release = snd_pcm_release,
- .poll = snd_pcm_playback_poll,
- .unlocked_ioctl = snd_pcm_playback_ioctl,
- .compat_ioctl = snd_pcm_ioctl_compat,
- .mmap = snd_pcm_mmap,
- .fasync = snd_pcm_fasync,
-};
-
-static struct file_operations snd_pcm_f_ops_capture = {
- .owner = THIS_MODULE,
- .read = snd_pcm_read,
- .readv = snd_pcm_readv,
- .open = snd_pcm_open,
- .release = snd_pcm_release,
- .poll = snd_pcm_capture_poll,
- .unlocked_ioctl = snd_pcm_capture_ioctl,
- .compat_ioctl = snd_pcm_ioctl_compat,
- .mmap = snd_pcm_mmap,
- .fasync = snd_pcm_fasync,
-};
-
-struct snd_minor snd_pcm_reg[2] =
-{
+struct file_operations snd_pcm_f_ops[2] = {
{
- .comment = "digital audio playback",
- .f_ops = &snd_pcm_f_ops_playback,
+ .owner = THIS_MODULE,
+ .write = snd_pcm_write,
+ .writev = snd_pcm_writev,
+ .open = snd_pcm_open,
+ .release = snd_pcm_release,
+ .poll = snd_pcm_playback_poll,
+ .unlocked_ioctl = snd_pcm_playback_ioctl,
+ .compat_ioctl = snd_pcm_ioctl_compat,
+ .mmap = snd_pcm_mmap,
+ .fasync = snd_pcm_fasync,
},
{
- .comment = "digital audio capture",
- .f_ops = &snd_pcm_f_ops_capture,
+ .owner = THIS_MODULE,
+ .read = snd_pcm_read,
+ .readv = snd_pcm_readv,
+ .open = snd_pcm_open,
+ .release = snd_pcm_release,
+ .poll = snd_pcm_capture_poll,
+ .unlocked_ioctl = snd_pcm_capture_ioctl,
+ .compat_ioctl = snd_pcm_ioctl_compat,
+ .mmap = snd_pcm_mmap,
+ .fasync = snd_pcm_fasync,
}
};