ALSA: hda - move alloc_cmd_io to hda_controller
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>
diff --git a/sound/pci/hda/hda_controller.c b/sound/pci/hda/hda_controller.c
index ed76f81..a7c5a5d9 100644
--- a/sound/pci/hda/hda_controller.c
+++ b/sound/pci/hda/hda_controller.c
@@ -1026,7 +1026,7 @@
/*
* 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 @@
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);