diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2015-02-15 19:07:18 -0500 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2015-02-15 19:07:18 -0500 |
commit | 97ae2b5c17d6cc988c6d49ae0cf95befb6b7081c (patch) | |
tree | a71115af6c30fdc9de0878e2cf1c51e95b17a324 /sound/soc/intel/sst-firmware.c | |
parent | ef47fa5280819deaa8da7e0db1d875b225de5838 (diff) | |
parent | c8af781ebf3ffe37c18c34ca89e29c085560e561 (diff) |
Merge branch 'bfin_rotary' into next
Merge bfin_rotary driver changes from Sonic Zhang.
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 | |||
706 | struct list_head *block_list) | 706 | struct list_head *block_list) |
707 | { | 707 | { |
708 | struct sst_mem_block *block, *tmp; | 708 | struct sst_mem_block *block, *tmp; |
709 | struct sst_block_allocator ba_tmp = *ba; | ||
709 | u32 end = ba->offset + ba->size, block_end; | 710 | u32 end = ba->offset + ba->size, block_end; |
710 | int err; | 711 | int err; |
711 | 712 | ||
@@ -730,9 +731,9 @@ static int block_alloc_fixed(struct sst_dsp *dsp, struct sst_block_allocator *ba | |||
730 | if (ba->offset >= block->offset && ba->offset < block_end) { | 731 | if (ba->offset >= block->offset && ba->offset < block_end) { |
731 | 732 | ||
732 | /* align ba to block boundary */ | 733 | /* align ba to block boundary */ |
733 | ba->size -= block_end - ba->offset; | 734 | ba_tmp.size -= block_end - ba->offset; |
734 | ba->offset = block_end; | 735 | ba_tmp.offset = block_end; |
735 | err = block_alloc_contiguous(dsp, ba, block_list); | 736 | err = block_alloc_contiguous(dsp, &ba_tmp, block_list); |
736 | if (err < 0) | 737 | if (err < 0) |
737 | return -ENOMEM; | 738 | return -ENOMEM; |
738 | 739 | ||
@@ -767,10 +768,10 @@ static int block_alloc_fixed(struct sst_dsp *dsp, struct sst_block_allocator *ba | |||
767 | list_move(&block->list, &dsp->used_block_list); | 768 | list_move(&block->list, &dsp->used_block_list); |
768 | list_add(&block->module_list, block_list); | 769 | list_add(&block->module_list, block_list); |
769 | /* align ba to block boundary */ | 770 | /* align ba to block boundary */ |
770 | ba->size -= block_end - ba->offset; | 771 | ba_tmp.size -= block_end - ba->offset; |
771 | ba->offset = block_end; | 772 | ba_tmp.offset = block_end; |
772 | 773 | ||
773 | err = block_alloc_contiguous(dsp, ba, block_list); | 774 | err = block_alloc_contiguous(dsp, &ba_tmp, block_list); |
774 | if (err < 0) | 775 | if (err < 0) |
775 | return -ENOMEM; | 776 | return -ENOMEM; |
776 | 777 | ||