Commit graph

110 commits

Author SHA1 Message Date
Julia Lawall b18e93a493 ASoC: ux500_msp_i2s: better use devm functions and fix error return code
Remove unnecessary calls to devm_kfree and replace iounmap by devm_iounmap
(and use resource_size for the third argument).  These changes make it
possible to remove the error-handling code at the end of
ux500_msp_i2s_init_msp, and all of the gotos become direct returns.

In the case of the second call to devm_kzalloc, the return variable ret was
not initialized.  Here it is changed to a direct return of -ENOMEM.

A simplified version of the semantic match that finds the second problem is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
(
if@p1 (\(ret < 0\|ret != 0\))
 { ... return ret; }
|
ret@p1 = 0
)
... when != ret = e1
    when != &ret
*if(...)
{
  ... when != ret = e2
      when forall
 return ret;
}

// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-08-20 20:44:28 +01:00
Lee Jones 0dcd47426a ASoC: ux500: Strengthen error checking after memory allocation
Currently there is no out-of-memory error checking after attempting
to allocate memory for the ux500_msp or ux500_msp_i2s_drvdata data
structures. Instead we go about populating them regardless. This
patch applies the necessary error checking to prevent a panic.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-08-03 23:03:55 +01:00
Lee Jones aa50fe55ac ASoC: ux500: Include the correct header files
Thought to be another merge error, board-mop500-msp.h has never existed
in the upstream kernel, only msp.h. This patch changes the include files
to match the existing file name.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-07-26 12:58:34 +01:00
Lars-Peter Clausen 9883ab229d ASoC: dmaengine-pcm: Rename and deprecate snd_dmaengine_pcm_pointer
Currently the sound dmaengine pcm helper functions implement the pcm_pointer
callback by trying to count the number of elapsed periods. This is done by
advancing the stream position in the dmaengine callback by one period.
Unfortunately there is no guarantee that the callback will be called for each
elapsed period. It may be possible that under high system load it is only called
once for multiple elapsed periods. This patch renames the current implementation
and documents its shortcomings and that it should not be used anymore in new
drivers.

The next patch will introduce a new snd_dmaengine_pcm_pointer which will be
implemented based on querying the current stream position from the dma device.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by Vinod Koul <vinod.koul@linux.intel.com>
Acked-by: Dong Aisheng <dong.aisheng@linaro.org
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-06-20 15:38:32 +01:00
Ola Lilja e0690385a8 ASoC: Ux500: Add machine-driver
Add machine-driver for ST-Ericsson U8500 platform, including
support for the AB8500-codec.

Signed-off-by: Ola Lilja <ola.o.lilja@stericsson.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-06-17 20:46:12 +01:00
Ola Lilja 85f243912b ASoC: Ux500: Correct license strings
GPLv2 -> GPL v2

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Ola Lilja <ola.o.lilja@stericsson.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-06-13 17:22:41 +08:00
Ola Lilja 01a0c1139c ASoC: Ux500: Add platform-driver
Add platform-driver handling all DMA-activities.

Signed-off-by: Ola Lilja <ola.o.lilja@stericsson.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-06-03 13:06:38 +01:00
Mark Brown 72b3be3cf5 ASoC: ux500: Don't make the CPU I2S driver user selectable
It can only be used with a machine driver so the idiomatic thing for
ASoC is to select this driver from the machine driver.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-05-10 10:05:18 +01:00
Mark Brown c632d068de ASoC: ux500: Fix dependencies
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-05-10 09:57:19 +01:00
Ola Lilja 3592b7f69a ASoC: Ux500: Add MSP I2S-driver
Add driver for running I2S with the MSP-block.

Signed-off-by: Ola Lilja <ola.o.lilja@stericsson.com>
[Fixed trailing whitespace -- broonie]
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-05-09 12:52:59 +01:00