Skip to content

Commit 986f03f

Browse files
Jyri Sarhalgirdwood
authored andcommitted
Audio: Aria: All memory allocations through module API
Allocate all memory through module API mod_alloc() and friends. The one rballoc() call is converted to mod_balloc(). Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
1 parent 9c32699 commit 986f03f

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

src/audio/aria/aria.c

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
#include <sof/audio/pipeline.h>
1010
#include <rtos/panic.h>
1111
#include <sof/ipc/msg.h>
12-
#include <rtos/alloc.h>
1312
#include <rtos/cache.h>
1413
#include <rtos/init.h>
1514
#include <sof/lib/notifier.h>
@@ -126,7 +125,7 @@ static int aria_init(struct processing_module *mod)
126125
list_init(&dev->bsource_list);
127126
list_init(&dev->bsink_list);
128127

129-
cd = rzalloc(SOF_MEM_FLAG_USER, sizeof(*cd));
128+
cd = mod_zalloc(mod, sizeof(*cd));
130129
if (!cd) {
131130
return -ENOMEM;
132131
}
@@ -145,10 +144,10 @@ static int aria_init(struct processing_module *mod)
145144
}
146145
mod_data->private = cd;
147146

148-
buf = rballoc(SOF_MEM_FLAG_USER, req_mem);
147+
buf = mod_balloc(mod, req_mem);
149148

150149
if (!buf) {
151-
rfree(cd);
150+
mod_free(mod, cd);
152151
comp_err(dev, "allocation failed for size %d", req_mem);
153152
return -ENOMEM;
154153
}
@@ -160,8 +159,8 @@ static int aria_free(struct processing_module *mod)
160159
{
161160
struct aria_data *cd = module_get_private_data(mod);
162161

163-
rfree(cd->data_addr);
164-
rfree(cd);
162+
mod_free(mod, cd->data_addr);
163+
mod_free(mod, cd);
165164
return 0;
166165
}
167166

0 commit comments

Comments
 (0)