diff options
Diffstat (limited to 'sound/core/sound_oss.c')
-rw-r--r-- | sound/core/sound_oss.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sound/core/sound_oss.c b/sound/core/sound_oss.c index 726a49ac9725..573a65eb2b79 100644 --- a/sound/core/sound_oss.c +++ b/sound/core/sound_oss.c | |||
@@ -21,7 +21,7 @@ | |||
21 | 21 | ||
22 | #ifdef CONFIG_SND_OSSEMUL | 22 | #ifdef CONFIG_SND_OSSEMUL |
23 | 23 | ||
24 | #if !defined(CONFIG_SOUND) && !(defined(MODULE) && defined(CONFIG_SOUND_MODULE)) | 24 | #if !IS_ENABLED(CONFIG_SOUND) |
25 | #error "Enable the OSS soundcore multiplexer (CONFIG_SOUND) in the kernel." | 25 | #error "Enable the OSS soundcore multiplexer (CONFIG_SOUND) in the kernel." |
26 | #endif | 26 | #endif |
27 | 27 | ||
@@ -55,7 +55,7 @@ void *snd_lookup_oss_minor_data(unsigned int minor, int type) | |||
55 | if (mreg && mreg->type == type) { | 55 | if (mreg && mreg->type == type) { |
56 | private_data = mreg->private_data; | 56 | private_data = mreg->private_data; |
57 | if (private_data && mreg->card_ptr) | 57 | if (private_data && mreg->card_ptr) |
58 | atomic_inc(&mreg->card_ptr->refcount); | 58 | get_device(&mreg->card_ptr->card_dev); |
59 | } else | 59 | } else |
60 | private_data = NULL; | 60 | private_data = NULL; |
61 | mutex_unlock(&sound_oss_mutex); | 61 | mutex_unlock(&sound_oss_mutex); |
@@ -105,8 +105,7 @@ static int snd_oss_kernel_minor(int type, struct snd_card *card, int dev) | |||
105 | } | 105 | } |
106 | 106 | ||
107 | int snd_register_oss_device(int type, struct snd_card *card, int dev, | 107 | int snd_register_oss_device(int type, struct snd_card *card, int dev, |
108 | const struct file_operations *f_ops, void *private_data, | 108 | const struct file_operations *f_ops, void *private_data) |
109 | const char *name) | ||
110 | { | 109 | { |
111 | int minor = snd_oss_kernel_minor(type, card, dev); | 110 | int minor = snd_oss_kernel_minor(type, card, dev); |
112 | int minor_unit; | 111 | int minor_unit; |