aboutsummaryrefslogtreecommitdiffstats
path: root/sound/core/oss/mixer_oss.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/core/oss/mixer_oss.c')
-rw-r--r--sound/core/oss/mixer_oss.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sound/core/oss/mixer_oss.c b/sound/core/oss/mixer_oss.c
index 2dd6bf9b49ed..2d7a42014f51 100644
--- a/sound/core/oss/mixer_oss.c
+++ b/sound/core/oss/mixer_oss.c
@@ -41,12 +41,13 @@ MODULE_ALIAS_SNDRV_MINOR(SNDRV_MINOR_OSS_MIXER);
41 41
42static int snd_mixer_oss_open(struct inode *inode, struct file *file) 42static int snd_mixer_oss_open(struct inode *inode, struct file *file)
43{ 43{
44 int cardnum = SNDRV_MINOR_OSS_CARD(iminor(inode));
45 struct snd_card *card; 44 struct snd_card *card;
46 struct snd_mixer_oss_file *fmixer; 45 struct snd_mixer_oss_file *fmixer;
47 int err; 46 int err;
48 47
49 if ((card = snd_cards[cardnum]) == NULL) 48 card = snd_lookup_oss_minor_data(iminor(inode),
49 SNDRV_OSS_DEVICE_TYPE_MIXER);
50 if (card == NULL)
50 return -ENODEV; 51 return -ENODEV;
51 if (card->mixer_oss == NULL) 52 if (card->mixer_oss == NULL)
52 return -ENODEV; 53 return -ENODEV;
@@ -1286,7 +1287,7 @@ static int snd_mixer_oss_notify_handler(struct snd_card *card, int cmd)
1286 sprintf(name, "mixer%i%i", card->number, 0); 1287 sprintf(name, "mixer%i%i", card->number, 0);
1287 if ((err = snd_register_oss_device(SNDRV_OSS_DEVICE_TYPE_MIXER, 1288 if ((err = snd_register_oss_device(SNDRV_OSS_DEVICE_TYPE_MIXER,
1288 card, 0, 1289 card, 0,
1289 &snd_mixer_oss_f_ops, 1290 &snd_mixer_oss_f_ops, card,
1290 name)) < 0) { 1291 name)) < 0) {
1291 snd_printk(KERN_ERR "unable to register OSS mixer device %i:%i\n", 1292 snd_printk(KERN_ERR "unable to register OSS mixer device %i:%i\n",
1292 card->number, 0); 1293 card->number, 0);