diff options
author | Rob Herring <r.herring@freescale.com> | 2010-03-01 19:03:45 -0600 |
---|---|---|
committer | Alejandro Gonzalez <alex.gonzalez@digi.com> | 2010-05-25 10:57:50 +0200 |
commit | d07c4c722170a8ad6cbe2aef5e99f38f2f8a1886 (patch) | |
tree | bf773b9c708e77fc36d7f439feea45d59f6d89ed /sound | |
parent | a18fe77713d49091f241acbaef25850a8575e18d (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>
Signed-off-by: Alejandro Gonzalez <alex.gonzalez@digi.com>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/arm/mxc-alsa-spdif.c | 22 |
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); |