summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorRob Herring <r.herring@freescale.com>2010-03-01 19:03:45 -0600
committerRob Herring <r.herring@freescale.com>2010-03-09 09:38:21 -0600
commitd112ffd919cda343133002f7db12e969301f2fa9 (patch)
treefeecf3bbea4419f5824bee9886685dbb03ab8bb2 /sound
parent5489e910140e8bae27ecb02314449e2a05fe91ab (diff)
ENGR00121386 imx spdif: get irq from platform resources
Pass the irq number in platform device resources. Signed-off-by: Rob Herring <r.herring@freescale.com>
Diffstat (limited to 'sound')
-rw-r--r--sound/arm/mxc-alsa-spdif.c22
1 files changed, 8 insertions, 14 deletions
diff --git a/sound/arm/mxc-alsa-spdif.c b/sound/arm/mxc-alsa-spdif.c
index 15d053f78a5a..93a34cd03e11 100644
--- a/sound/arm/mxc-alsa-spdif.c
+++ b/sound/arm/mxc-alsa-spdif.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2007-2009 Freescale Semiconductor, Inc. All Rights Reserved.
+ * Copyright (C) 2007-2010 Freescale Semiconductor, Inc. All Rights Reserved.
*/
/*
@@ -31,20 +31,11 @@
#include <linux/platform_device.h>
#include <linux/init.h>
#include <linux/errno.h>
-#include <linux/ioctl.h>
+#include <linux/io.h>
#include <linux/delay.h>
-#include <linux/slab.h>
#include <linux/dma-mapping.h>
#include <linux/soundcard.h>
#include <linux/clk.h>
-#ifdef CONFIG_PM
-#include <linux/pm.h>
-#endif
-
-#include <mach/dma.h>
-#include <asm/mach-types.h>
-#include <asm/io.h>
-#include <asm/irq.h>
#include <sound/core.h>
#include <sound/pcm.h>
@@ -52,6 +43,8 @@
#include <sound/initval.h>
#include <sound/control.h>
+#include <mach/dma.h>
+
#define MXC_SPDIF_NAME "MXC_SPDIF"
static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX;
static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR;
@@ -2069,7 +2062,7 @@ extern void gpio_spdif_active(void);
static int mxc_alsa_spdif_probe(struct platform_device
*pdev)
{
- int err, idx;
+ int err, idx, irq;
static int dev;
struct snd_card *card;
struct mxc_spdif_device *chip;
@@ -2139,7 +2132,8 @@ static int mxc_alsa_spdif_probe(struct platform_device
/* disable all the interrupts */
spdif_intr_enable(0xffffff, 0);
/* spdif interrupt register and disable */
- if (request_irq(MXC_INT_SPDIF, spdif_isr, 0, "spdif", chip)) {
+ irq = platform_get_irq(pdev, 0);
+ if ((irq <= 0) || request_irq(irq, spdif_isr, 0, "spdif", chip)) {
pr_err("MXC spdif: failed to request irq\n");
err = -EBUSY;
goto nodev;
@@ -2184,7 +2178,7 @@ static int mxc_alsa_spdif_remove(struct platform_device *pdev)
card = platform_get_drvdata(pdev);
plat_data = pdev->dev.platform_data;
chip = card->private_data;
- free_irq(MXC_INT_SPDIF, chip);
+ free_irq(platform_get_irq(pdev, 0), chip);
iounmap(chip->reg_base);
snd_card_free(card);