summaryrefslogtreecommitdiff
path: root/sound/core/hwdep.c
diff options
context:
space:
mode:
authorClemens Ladisch <clemens@ladisch.de>2005-10-24 17:05:03 +0200
committerJaroslav Kysela <perex@suse.cz>2005-11-04 13:20:08 +0100
commitf1902860161ff212c515e7ea629e880fec856a37 (patch)
treec3dc4d5ca38c05f15f06a6583594f7b54dad4c66 /sound/core/hwdep.c
parentc8a7e5c40ddcf98f1026581e411b05ff86491907 (diff)
downloadlwn-f1902860161ff212c515e7ea629e880fec856a37.tar.gz
lwn-f1902860161ff212c515e7ea629e880fec856a37.zip
[ALSA] fix improper CONFIG_SND_MAJOR usage
Modules: HWDEP Midlevel,PCM Midlevel,RawMidi Midlevel,ALSA Core Replace usage of CONFIG_SND_MAJOR with snd_major, where appropriate. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Diffstat (limited to 'sound/core/hwdep.c')
-rw-r--r--sound/core/hwdep.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/sound/core/hwdep.c b/sound/core/hwdep.c
index 9383f1294fb5..e91cee35a4b9 100644
--- a/sound/core/hwdep.c
+++ b/sound/core/hwdep.c
@@ -81,20 +81,16 @@ static int snd_hwdep_open(struct inode *inode, struct file * file)
int err;
wait_queue_t wait;
- switch (major) {
- case CONFIG_SND_MAJOR:
+ if (major == snd_major) {
cardnum = SNDRV_MINOR_CARD(iminor(inode));
device = SNDRV_MINOR_DEVICE(iminor(inode)) - SNDRV_MINOR_HWDEP;
- break;
#ifdef CONFIG_SND_OSSEMUL
- case SOUND_MAJOR:
+ } else if (major == SOUND_MAJOR) {
cardnum = SNDRV_MINOR_OSS_CARD(iminor(inode));
device = 0;
- break;
#endif
- default:
+ } else
return -ENXIO;
- }
cardnum %= SNDRV_CARDS;
device %= SNDRV_MINOR_HWDEPS;
hw = snd_hwdep_devices[(cardnum * SNDRV_MINOR_HWDEPS) + device];