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>
/*
* CORB / RIRB interface
*/
-int azx_alloc_cmd_io(struct azx *chip)
+static int azx_alloc_cmd_io(struct azx *chip)
{
int err;
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);
/*
* 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);
}
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;