]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - sound/isa/gus/gus_main.c
Merge branch 'iommu-fixes-2.6.28' of git://git.kernel.org/pub/scm/linux/kernel/git...
[linux-2.6-omap-h63xx.git] / sound / isa / gus / gus_main.c
index b14d5d6d9a3233b60ad233d988719bd5b74f70cd..12eb98f2f931e123c583419134064c1fb7004e33 100644 (file)
@@ -19,7 +19,6 @@
  *
  */
 
-#include <sound/driver.h>
 #include <linux/init.h>
 #include <linux/interrupt.h>
 #include <linux/delay.h>
@@ -104,12 +103,6 @@ static int snd_gus_free(struct snd_gus_card *gus)
 {
        if (gus->gf1.res_port2 == NULL)
                goto __hw_end;
-#if defined(CONFIG_SND_SEQUENCER) || (defined(MODULE) && defined(CONFIG_SND_SEQUENCER_MODULE))
-       if (gus->seq_dev) {
-               snd_device_free(gus->card, gus->seq_dev);
-               gus->seq_dev = NULL;
-       }
-#endif
        snd_gf1_stop(gus);
        snd_gus_init_dma_irq(gus, 0);
       __hw_end:
@@ -283,9 +276,11 @@ static int snd_gus_init_dma_irq(struct snd_gus_card * gus, int latches)
        static unsigned char dmas[8] =
                {6, 1, 0, 2, 0, 3, 4, 5};
 
-       snd_assert(gus != NULL, return -EINVAL);
+       if (snd_BUG_ON(!gus))
+               return -EINVAL;
        card = gus->card;
-       snd_assert(card != NULL, return -EINVAL);
+       if (snd_BUG_ON(!card))
+               return -EINVAL;
 
        gus->mix_cntrl_reg &= 0xf8;
        gus->mix_cntrl_reg |= 0x01;     /* disable MIC, LINE IN, enable LINE OUT */
@@ -408,14 +403,6 @@ static int snd_gus_check_version(struct snd_gus_card * gus)
        return 0;
 }
 
-#if defined(CONFIG_SND_SEQUENCER) || (defined(MODULE) && defined(CONFIG_SND_SEQUENCER_MODULE))
-static void snd_gus_seq_dev_free(struct snd_seq_device *seq_dev)
-{
-       struct snd_gus_card *gus = seq_dev->private_data;
-       gus->seq_dev = NULL;
-}
-#endif
-
 int snd_gus_initialize(struct snd_gus_card *gus)
 {
        int err;
@@ -430,15 +417,6 @@ int snd_gus_initialize(struct snd_gus_card *gus)
        }
        if ((err = snd_gus_init_dma_irq(gus, 1)) < 0)
                return err;
-#if defined(CONFIG_SND_SEQUENCER) || (defined(MODULE) && defined(CONFIG_SND_SEQUENCER_MODULE))
-       if (snd_seq_device_new(gus->card, 1, SNDRV_SEQ_DEV_ID_GUS,
-                              sizeof(struct snd_gus_card *), &gus->seq_dev) >= 0) {
-               strcpy(gus->seq_dev->name, "GUS");
-               *(struct snd_gus_card **)SNDRV_SEQ_DEVICE_ARGPTR(gus->seq_dev) = gus;
-               gus->seq_dev->private_data = gus;
-               gus->seq_dev->private_free = snd_gus_seq_dev_free;
-       }
-#endif
        snd_gf1_start(gus);
        gus->initialized = 1;
        return 0;