@@ -1777,10 +1777,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;
/* initialize streams */
azx_init_stream(chip);
@@ -1120,7 +1120,7 @@ int azx_position_ok(struct azx *chip, struct azx_dev *azx_dev)
/*
* CORB / RIRB interface
*/
-int azx_alloc_cmd_io(struct azx *chip)
+static int azx_alloc_cmd_io(struct azx *chip)
{
int err;
@@ -1622,6 +1622,11 @@ int azx_alloc_stream_pages(struct azx *chip)
return -ENOMEM;
}
mark_pages_wc(chip, &chip->posbuf, true);
+
+ /* allocate CORB/RIRB */
+ err = azx_alloc_cmd_io(chip);
+ if (err < 0)
+ return err;
return 0;
}
EXPORT_SYMBOL_GPL(azx_alloc_stream_pages);
@@ -54,6 +54,5 @@ unsigned int azx_get_response(struct hda_bus *bus,
void azx_init_cmd_io(struct azx *chip);
void azx_free_cmd_io(struct azx *chip);
void azx_update_rirb(struct azx *chip);
-int azx_alloc_cmd_io(struct azx *chip);
#endif /* __SOUND_HDA_SHARED_H */
Combining the call to alloc_cmd_io with the allocate pages function removes an extra interface between hda_intel and hda_shared. Signed-off-by: Dylan Reid <dgreid@chromium.org> --- sound/pci/hda/hda_intel.c | 4 ---- sound/pci/hda/hda_shared.c | 7 ++++++- sound/pci/hda/hda_shared.h | 1 - 3 files changed, 6 insertions(+), 6 deletions(-)