summaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2013-04-11 02:05:01 +0200
committerMark Brown <broonie@opensource.wolfsonmicro.com>2013-04-11 17:51:30 +0100
commitcb00e3a16dc60618c1ce56882e8bde1ad55069d9 (patch)
tree4c0b6a71f220cb860dd7e83ab0408926bb654d9b /sound
parenta7c1a644e16400a33e122f2b03c6a34240001b49 (diff)
downloadlinux-0-day-cb00e3a16dc60618c1ce56882e8bde1ad55069d9.tar.gz
linux-0-day-cb00e3a16dc60618c1ce56882e8bde1ad55069d9.tar.xz
ASoC: samsung: use irq resource for idma
With multiplatform kernels, we cannot use hardwired IRQ numbers in device drivers. This changes the idma driver to use a proper resource, like all other drivers do. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/samsung/idma.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/sound/soc/samsung/idma.c b/sound/soc/samsung/idma.c
index a07950b0c8ceb..f36a5414f5c42 100644
--- a/sound/soc/samsung/idma.c
+++ b/sound/soc/samsung/idma.c
@@ -68,6 +68,8 @@ static struct idma_info {
dma_addr_t lp_tx_addr;
} idma;
+static int idma_irq;
+
static void idma_getpos(dma_addr_t *src)
{
*src = idma.lp_tx_addr +
@@ -305,7 +307,7 @@ static int idma_open(struct snd_pcm_substream *substream)
if (prtd == NULL)
return -ENOMEM;
- ret = request_irq(IRQ_I2S0, iis_irq, 0, "i2s", prtd);
+ ret = request_irq(idma_irq, iis_irq, 0, "i2s", prtd);
if (ret < 0) {
pr_err("fail to claim i2s irq , ret = %d\n", ret);
kfree(prtd);
@@ -324,7 +326,7 @@ static int idma_close(struct snd_pcm_substream *substream)
struct snd_pcm_runtime *runtime = substream->runtime;
struct idma_ctrl *prtd = runtime->private_data;
- free_irq(IRQ_I2S0, prtd);
+ free_irq(idma_irq, prtd);
if (!prtd)
pr_err("idma_close called with prtd == NULL\n");
@@ -418,6 +420,10 @@ static struct snd_soc_platform_driver asoc_idma_platform = {
static int asoc_idma_platform_probe(struct platform_device *pdev)
{
+ idma_irq = platform_get_irq(pdev, 0);
+ if (idma_irq < 0)
+ return idma_irq;
+
return snd_soc_register_platform(&pdev->dev, &asoc_idma_platform);
}