]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
ALSA: hda - move alloc_cmd_io to hda_controller
authorDylan Reid <dgreid@chromium.org>
Fri, 28 Feb 2014 23:41:26 +0000 (15:41 -0800)
committerTakashi Iwai <tiwai@suse.de>
Sat, 1 Mar 2014 10:22:58 +0000 (11:22 +0100)
Combining the call to alloc_cmd_io with the allocate pages function
removes an extra interface between hda_intel and hda_controller.

Signed-off-by: Dylan Reid <dgreid@chromium.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/hda_controller.c
sound/pci/hda/hda_controller.h
sound/pci/hda/hda_intel.c

index ed76f8147b583e4f58ff8862e1c2c4257e70dd10..a7c5a5d9ad8fb977091256cedf39325e5d152a94 100644 (file)
@@ -1026,7 +1026,7 @@ EXPORT_SYMBOL_GPL(azx_attach_pcm_stream);
 /*
  * CORB / RIRB interface
  */
-int azx_alloc_cmd_io(struct azx *chip)
+static int azx_alloc_cmd_io(struct azx *chip)
 {
        int err;
 
@@ -1549,6 +1549,11 @@ int azx_alloc_stream_pages(struct azx *chip)
                dev_err(card->dev, "cannot allocate posbuf\n");
                return -ENOMEM;
        }
+
+       /* allocate CORB/RIRB */
+       err = azx_alloc_cmd_io(chip);
+       if (err < 0)
+               return err;
        return 0;
 }
 EXPORT_SYMBOL_GPL(azx_alloc_stream_pages);
index fb0cdddc356a93d50c3dd3b79b027793a19c5cb3..3a3d78ed6da859751408c7fe9b6f46c8cb305736 100644 (file)
@@ -50,7 +50,6 @@ void azx_free_stream_pages(struct azx *chip);
 /*
  * CORB / RIRB interface
  */
-int azx_alloc_cmd_io(struct azx *chip);
 void azx_init_cmd_io(struct azx *chip);
 void azx_free_cmd_io(struct azx *chip);
 void azx_update_rirb(struct azx *chip);
index a8af3d4ca4bed65c4f3c915f5cd8435cf83e6f95..3d6ccb8ef86efe3dddc91745e11679872247847a 100644 (file)
@@ -1807,10 +1807,6 @@ static int azx_first_init(struct azx *chip)
        }
 
        err = azx_alloc_stream_pages(chip);
-       if (err < 0)
-               return err;
-       /* allocate CORB/RIRB */
-       err = azx_alloc_cmd_io(chip);
        if (err < 0)
                return err;