aboutsummaryrefslogtreecommitdiffstats
path: root/sound/core/oss/pcm_oss.c
diff options
context:
space:
mode:
authorClemens Ladisch <clemens@ladisch.de>2005-11-20 08:03:48 -0500
committerJaroslav Kysela <perex@suse.cz>2006-01-03 06:29:14 -0500
commit2af677fc884fc6dc79e65c99050ea607ac8bab9b (patch)
tree4291d36c2f116d5887b88da5f0213b68933a1201 /sound/core/oss/pcm_oss.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/oss/pcm_oss.c')
-rw-r--r--sound/core/oss/pcm_oss.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/sound/core/oss/pcm_oss.c b/sound/core/oss/pcm_oss.c
index ffc13b9194b..947bf08df42 100644
--- a/sound/core/oss/pcm_oss.c
+++ b/sound/core/oss/pcm_oss.c
@@ -2444,18 +2444,12 @@ static struct file_operations snd_pcm_oss_f_reg =
2444 .mmap = snd_pcm_oss_mmap, 2444 .mmap = snd_pcm_oss_mmap,
2445}; 2445};
2446 2446
2447static struct snd_minor snd_pcm_oss_reg =
2448{
2449 .comment = "digital audio",
2450 .f_ops = &snd_pcm_oss_f_reg,
2451};
2452
2453static void register_oss_dsp(struct snd_pcm *pcm, int index) 2447static void register_oss_dsp(struct snd_pcm *pcm, int index)
2454{ 2448{
2455 char name[128]; 2449 char name[128];
2456 sprintf(name, "dsp%i%i", pcm->card->number, pcm->device); 2450 sprintf(name, "dsp%i%i", pcm->card->number, pcm->device);
2457 if (snd_register_oss_device(SNDRV_OSS_DEVICE_TYPE_PCM, 2451 if (snd_register_oss_device(SNDRV_OSS_DEVICE_TYPE_PCM,
2458 pcm->card, index, &snd_pcm_oss_reg, 2452 pcm->card, index, &snd_pcm_oss_f_reg,
2459 name) < 0) { 2453 name) < 0) {
2460 snd_printk(KERN_ERR "unable to register OSS PCM device %i:%i\n", 2454 snd_printk(KERN_ERR "unable to register OSS PCM device %i:%i\n",
2461 pcm->card->number, pcm->device); 2455 pcm->card->number, pcm->device);