Lines Matching full:minor

70 static void snd_request_other(int minor)  in snd_request_other()  argument
74 switch (minor) { in snd_request_other()
86 * @minor: the minor number
89 * Checks that a minor device with the specified type is registered, and returns
93 * if an associated instance with the given minor number and type is found.
99 void *snd_lookup_minor_data(unsigned int minor, int type) in snd_lookup_minor_data() argument
104 if (minor >= ARRAY_SIZE(snd_minors)) in snd_lookup_minor_data()
107 mreg = snd_minors[minor]; in snd_lookup_minor_data()
120 static struct snd_minor *autoload_device(unsigned int minor) in autoload_device() argument
124 dev = SNDRV_MINOR_DEVICE(minor); in autoload_device()
127 int card = SNDRV_MINOR_CARD(minor); in autoload_device()
135 snd_request_other(minor); in autoload_device()
138 return snd_minors[minor]; in autoload_device()
141 #define autoload_device(minor) NULL argument
146 unsigned int minor = iminor(inode); in snd_open() local
151 if (minor >= ARRAY_SIZE(snd_minors)) in snd_open()
154 mptr = snd_minors[minor]; in snd_open()
156 mptr = autoload_device(minor); in snd_open()
183 int minor; in snd_find_free_minor() local
191 for (minor = 0; minor < ARRAY_SIZE(snd_minors); ++minor) { in snd_find_free_minor()
193 if (SNDRV_MINOR_DEVICE(minor) == SNDRV_MINOR_CONTROL) in snd_find_free_minor()
195 if (minor == SNDRV_MINOR_SEQUENCER || in snd_find_free_minor()
196 minor == SNDRV_MINOR_TIMER) in snd_find_free_minor()
198 if (!snd_minors[minor]) in snd_find_free_minor()
199 return minor; in snd_find_free_minor()
206 int minor; in snd_find_free_minor() local
211 minor = type; in snd_find_free_minor()
216 minor = SNDRV_MINOR(card->number, type); in snd_find_free_minor()
225 minor = SNDRV_MINOR(card->number, type + dev); in snd_find_free_minor()
230 if (snd_BUG_ON(minor < 0 || minor >= SNDRV_OS_MINORS)) in snd_find_free_minor()
232 if (snd_minors[minor]) in snd_find_free_minor()
234 return minor; in snd_find_free_minor()
256 int minor; in snd_register_device() local
273 minor = snd_find_free_minor(type, card, dev); in snd_register_device()
274 if (minor < 0) { in snd_register_device()
275 err = minor; in snd_register_device()
280 device->devt = MKDEV(major, minor); in snd_register_device()
285 snd_minors[minor] = preg; in snd_register_device()
305 int minor; in snd_unregister_device() local
309 for (minor = 0; minor < ARRAY_SIZE(snd_minors); ++minor) { in snd_unregister_device()
310 preg = snd_minors[minor]; in snd_unregister_device()
312 snd_minors[minor] = NULL; in snd_unregister_device()
319 if (minor >= ARRAY_SIZE(snd_minors)) in snd_unregister_device()
355 int minor; in snd_minor_info_read() local
359 for (minor = 0; minor < SNDRV_OS_MINORS; ++minor) { in snd_minor_info_read()
360 mptr = snd_minors[minor]; in snd_minor_info_read()
366 minor, mptr->card, mptr->device, in snd_minor_info_read()
370 minor, mptr->card, in snd_minor_info_read()
373 snd_iprintf(buffer, "%3i: : %s\n", minor, in snd_minor_info_read()