From: Mark Brown Date: Thu, 19 Jun 2008 02:18:09 +0000 (+0100) Subject: [ARM] 5108/2: PXA SSP: Don't unconditionally free interrupt X-Git-Tag: v2.6.27-rc1~850^2^2~13^2~3 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bbae02035a87a3ef45f751032ec8d2bb6f3ed496;p=linux-2.6 [ARM] 5108/2: PXA SSP: Don't unconditionally free interrupt Callers may stop the SSP core requesting the interrupt so it can't be freed unconditionally. Also use NO_IRQ like we should. Signed-off-by: Mark Brown Acked-by: Eric Miao Signed-off-by: Russell King --- diff --git a/arch/arm/mach-pxa/ssp.c b/arch/arm/mach-pxa/ssp.c index 00af7f2fed..363668cc3a 100644 --- a/arch/arm/mach-pxa/ssp.c +++ b/arch/arm/mach-pxa/ssp.c @@ -285,7 +285,7 @@ int ssp_init(struct ssp_dev *dev, u32 port, u32 init_flags) goto out_region; dev->irq = ssp->irq; } else - dev->irq = 0; + dev->irq = NO_IRQ; /* turn on SSP port clock */ clk_enable(ssp->clk); @@ -306,7 +306,8 @@ void ssp_exit(struct ssp_dev *dev) struct ssp_device *ssp = dev->ssp; ssp_disable(dev); - free_irq(dev->irq, dev); + if (dev->irq != NO_IRQ) + free_irq(dev->irq, dev); clk_disable(ssp->clk); ssp_free(ssp); }