From: Dylan Reid Date: Fri, 28 Feb 2014 23:41:26 +0000 (-0800) Subject: ALSA: hda - move alloc_cmd_io to hda_controller X-Git-Tag: firefly_0821_release~176^2~4090^2~22^2~29 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=f19c3ec21bef658b48df78c82cec7fd78681d653;p=firefly-linux-kernel-4.4.55.git 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 Signed-off-by: Takashi Iwai --- 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); /* * 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); 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); /* * 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); 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 @@ -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;