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>
This commit is contained in:
Dylan Reid 2014-02-28 15:41:26 -08:00 коммит произвёл Takashi Iwai
Родитель 6e85dddc1c
Коммит f19c3ec21b
3 изменённых файлов: 6 добавлений и 6 удалений

Просмотреть файл

@ -1026,7 +1026,7 @@ EXPORT_SYMBOL_GPL(azx_attach_pcm_stream);
/* /*
* CORB / RIRB interface * CORB / RIRB interface
*/ */
int azx_alloc_cmd_io(struct azx *chip) static int azx_alloc_cmd_io(struct azx *chip)
{ {
int err; int err;
@ -1549,6 +1549,11 @@ int azx_alloc_stream_pages(struct azx *chip)
dev_err(card->dev, "cannot allocate posbuf\n"); dev_err(card->dev, "cannot allocate posbuf\n");
return -ENOMEM; return -ENOMEM;
} }
/* allocate CORB/RIRB */
err = azx_alloc_cmd_io(chip);
if (err < 0)
return err;
return 0; return 0;
} }
EXPORT_SYMBOL_GPL(azx_alloc_stream_pages); EXPORT_SYMBOL_GPL(azx_alloc_stream_pages);

Просмотреть файл

@ -50,7 +50,6 @@ void azx_free_stream_pages(struct azx *chip);
/* /*
* CORB / RIRB interface * CORB / RIRB interface
*/ */
int azx_alloc_cmd_io(struct azx *chip);
void azx_init_cmd_io(struct azx *chip); void azx_init_cmd_io(struct azx *chip);
void azx_free_cmd_io(struct azx *chip); void azx_free_cmd_io(struct azx *chip);
void azx_update_rirb(struct azx *chip); void azx_update_rirb(struct azx *chip);

Просмотреть файл

@ -1807,10 +1807,6 @@ static int azx_first_init(struct azx *chip)
} }
err = azx_alloc_stream_pages(chip); err = azx_alloc_stream_pages(chip);
if (err < 0)
return err;
/* allocate CORB/RIRB */
err = azx_alloc_cmd_io(chip);
if (err < 0) if (err < 0)
return err; return err;