[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 <broonie@opensource.wolfsonmicro.com>
Acked-by: Eric Miao <eric.miao@marvell.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
This commit is contained in:
Mark Brown 2008-06-19 03:18:09 +01:00 committed by Russell King
parent 20072fd0c9
commit bbae02035a
1 changed files with 3 additions and 2 deletions

View File

@ -285,7 +285,7 @@ int ssp_init(struct ssp_dev *dev, u32 port, u32 init_flags)
goto out_region; goto out_region;
dev->irq = ssp->irq; dev->irq = ssp->irq;
} else } else
dev->irq = 0; dev->irq = NO_IRQ;
/* turn on SSP port clock */ /* turn on SSP port clock */
clk_enable(ssp->clk); clk_enable(ssp->clk);
@ -306,6 +306,7 @@ void ssp_exit(struct ssp_dev *dev)
struct ssp_device *ssp = dev->ssp; struct ssp_device *ssp = dev->ssp;
ssp_disable(dev); ssp_disable(dev);
if (dev->irq != NO_IRQ)
free_irq(dev->irq, dev); free_irq(dev->irq, dev);
clk_disable(ssp->clk); clk_disable(ssp->clk);
ssp_free(ssp); ssp_free(ssp);