diff options
| author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2015-02-20 11:54:53 -0800 |
|---|---|---|
| committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2015-02-20 11:54:53 -0800 |
| commit | 4c971aa78314253cce914ed29e3d90df3326d646 (patch) | |
| tree | a9dcf0b1fdc9e1aacff90afb5b3ab79983115dcc /sound/soc/intel/sst-firmware.c | |
| parent | 4ba24fef3eb3b142197135223b90ced2f319cd53 (diff) | |
| parent | 290b799c390d77d27effee3ce312203aaa32ee74 (diff) | |
Merge branch 'next' into for-linus
Second round of updates for 3.20.
Diffstat (limited to 'sound/soc/intel/sst-firmware.c')
| -rw-r--r-- | sound/soc/intel/sst-firmware.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/sound/soc/intel/sst-firmware.c b/sound/soc/intel/sst-firmware.c index ef2e8b5766a1..b3f9489794a6 100644 --- a/sound/soc/intel/sst-firmware.c +++ b/sound/soc/intel/sst-firmware.c @@ -706,6 +706,7 @@ static int block_alloc_fixed(struct sst_dsp *dsp, struct sst_block_allocator *ba struct list_head *block_list) { struct sst_mem_block *block, *tmp; + struct sst_block_allocator ba_tmp = *ba; u32 end = ba->offset + ba->size, block_end; int err; @@ -730,9 +731,9 @@ static int block_alloc_fixed(struct sst_dsp *dsp, struct sst_block_allocator *ba if (ba->offset >= block->offset && ba->offset < block_end) { /* align ba to block boundary */ - ba->size -= block_end - ba->offset; - ba->offset = block_end; - err = block_alloc_contiguous(dsp, ba, block_list); + ba_tmp.size -= block_end - ba->offset; + ba_tmp.offset = block_end; + err = block_alloc_contiguous(dsp, &ba_tmp, block_list); if (err < 0) return -ENOMEM; @@ -767,10 +768,10 @@ static int block_alloc_fixed(struct sst_dsp *dsp, struct sst_block_allocator *ba list_move(&block->list, &dsp->used_block_list); list_add(&block->module_list, block_list); /* align ba to block boundary */ - ba->size -= block_end - ba->offset; - ba->offset = block_end; + ba_tmp.size -= block_end - ba->offset; + ba_tmp.offset = block_end; - err = block_alloc_contiguous(dsp, ba, block_list); + err = block_alloc_contiguous(dsp, &ba_tmp, block_list); if (err < 0) return -ENOMEM; |
