2.1.122 breaks usage count of soundcore.o (+patch)

Oleg Drokin (green@ccssu.crimea.ua)
Sat, 19 Sep 1998 15:31:04 +0400 (MSD)


Hello!

When we use modular sound in 2.1.122, then we cannot unload soundcore.o
anymore, because we never free mixer.
Here is the patch at the end of this message.
We do not need that check as we already have one in sound_unload_mixerdev:

void sound_unload_mixerdev(int dev)
{
if (dev != -1)
{
mixer_devs[dev] = NULL;
unregister_sound_mixer(dev<<4);
}
}

--- linux/drivers/sound/sb_common.c.orig Sat Sep 19 15:20:11 1998
+++ linux/drivers/sound/sb_common.c Sat Sep 19 15:20:32 1998
@@ -954,8 +954,7 @@
if (!(devc->caps & SB_NO_AUDIO && devc->caps & SB_NO_MIDI) && devc->irq > 0)
{
free_irq(devc->irq, devc);
- if (devc->my_mixerdev)
- sound_unload_mixerdev(devc->my_mixerdev);
+ sound_unload_mixerdev(devc->my_mixerdev);
/* We don't have to do this bit any more the UART401 is its own
master -- Krzysztof Halasa */
/* But we have to do it, if UART401 is not detected */

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/