aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci
diff options
context:
space:
mode:
authorDylan Reid <dgreid@chromium.org>2014-02-28 18:41:26 -0500
committerTakashi Iwai <tiwai@suse.de>2014-03-01 05:22:58 -0500
commitf19c3ec21bef658b48df78c82cec7fd78681d653 (patch)
tree51f58a31ad0d7146bb093ad98bc83bead950215c /sound/pci
parent6e85dddc1c79e8efdc8f670940e98151df91dc08 (diff)
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>
Diffstat (limited to 'sound/pci')
-rw-r--r--sound/pci/hda/hda_controller.c7
-rw-r--r--sound/pci/hda/hda_controller.h1
-rw-r--r--sound/pci/hda/hda_intel.c4
3 files changed, 6 insertions, 6 deletions
diff --git a/sound/pci/hda/hda_controller.c b/sound/pci/hda/hda_controller.c
index ed76f8147b58..a7c5a5d9ad8f 100644
--- a/sound/pci/hda/hda_controller.c
+++ b/sound/pci/hda/hda_controller.c
@@ -1026,7 +1026,7 @@ EXPORT_SYMBOL_GPL(azx_attach_pcm_stream);
1026/* 1026/*
1027 * CORB / RIRB interface 1027 * CORB / RIRB interface
1028 */ 1028 */
1029int azx_alloc_cmd_io(struct azx *chip) 1029static int azx_alloc_cmd_io(struct azx *chip)
1030{ 1030{
1031 int err; 1031 int err;
1032 1032
@@ -1549,6 +1549,11 @@ int azx_alloc_stream_pages(struct azx *chip)
1549 dev_err(card->dev, "cannot allocate posbuf\n"); 1549 dev_err(card->dev, "cannot allocate posbuf\n");
1550 return -ENOMEM; 1550 return -ENOMEM;
1551 } 1551 }
1552
1553 /* allocate CORB/RIRB */
1554 err = azx_alloc_cmd_io(chip);
1555 if (err < 0)
1556 return err;
1552 return 0; 1557 return 0;
1553} 1558}
1554EXPORT_SYMBOL_GPL(azx_alloc_stream_pages); 1559EXPORT_SYMBOL_GPL(azx_alloc_stream_pages);
diff --git a/sound/pci/hda/hda_controller.h b/sound/pci/hda/hda_controller.h
index fb0cdddc356a..3a3d78ed6da8 100644
--- a/sound/pci/hda/hda_controller.h
+++ b/sound/pci/hda/hda_controller.h
@@ -50,7 +50,6 @@ void azx_free_stream_pages(struct azx *chip);
50/* 50/*
51 * CORB / RIRB interface 51 * CORB / RIRB interface
52 */ 52 */
53int azx_alloc_cmd_io(struct azx *chip);
54void azx_init_cmd_io(struct azx *chip); 53void azx_init_cmd_io(struct azx *chip);
55void azx_free_cmd_io(struct azx *chip); 54void azx_free_cmd_io(struct azx *chip);
56void azx_update_rirb(struct azx *chip); 55void azx_update_rirb(struct azx *chip);
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index a8af3d4ca4be..3d6ccb8ef86e 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -1809,10 +1809,6 @@ static int azx_first_init(struct azx *chip)
1809 err = azx_alloc_stream_pages(chip); 1809 err = azx_alloc_stream_pages(chip);
1810 if (err < 0) 1810 if (err < 0)
1811 return err; 1811 return err;
1812 /* allocate CORB/RIRB */
1813 err = azx_alloc_cmd_io(chip);
1814 if (err < 0)
1815 return err;
1816 1812
1817 /* initialize streams */ 1813 /* initialize streams */
1818 azx_init_stream(chip); 1814 azx_init_stream(chip);