Skip to content

Commit

Permalink
ASoC: Intel: Fix block offset calculations.
Browse files Browse the repository at this point in the history
Block offset calculations are done in the contiguous allocator so
are not required here.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
  • Loading branch information
Liam Girdwood authored and Mark Brown committed May 7, 2014
1 parent e9024f0 commit 2b39aab
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions sound/soc/intel/sst-firmware.c
Original file line number Diff line number Diff line change
Expand Up @@ -244,8 +244,7 @@ static int block_alloc(struct sst_module *module,
/* do we span > 1 blocks */
if (data->size > block->size) {
ret = block_alloc_contiguous(module, data,
block->offset + block->size,
data->size - block->size);
block->offset, data->size);
if (ret == 0)
return ret;
}
Expand Down Expand Up @@ -341,7 +340,7 @@ static int block_alloc_fixed(struct sst_module *module,

err = block_alloc_contiguous(module, data,
block->offset + block->size,
data->size - block->size + data->offset - block->offset);
data->size - block->size);
if (err < 0)
return -ENOMEM;

Expand All @@ -368,8 +367,7 @@ static int block_alloc_fixed(struct sst_module *module,
if (data->offset >= block->offset && data->offset < block_end) {

err = block_alloc_contiguous(module, data,
block->offset + block->size,
data->size - block->size);
block->offset, data->size);
if (err < 0)
return -ENOMEM;

Expand Down

0 comments on commit 2b39aab

Please sign in to comment.