ata/sata_fsl: save irq in private data for irq unmapping
authorLi Yang <leoli@freescale.com>
Wed, 31 Oct 2007 11:27:55 +0000 (19:27 +0800)
committerJeff Garzik <jeff@garzik.org>
Sat, 3 Nov 2007 12:46:27 +0000 (08:46 -0400)
Powerpc uses virtual irq which has to be unmapped.

Signed-off-by: Li Yang <leoli@freescale.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
drivers/ata/sata_fsl.c

index 4c8c8201665d1afa3be95e9aa7f8b35564ff4669..f8d8614a514bca54714383564e4370dd1998e07a 100644 (file)
@@ -265,6 +265,7 @@ struct sata_fsl_host_priv {
        void __iomem *hcr_base;
        void __iomem *ssr_base;
        void __iomem *csr_base;
+       int irq;
 };
 
 static inline unsigned int sata_fsl_tag(unsigned int tag,
@@ -1399,6 +1400,7 @@ static int sata_fsl_probe(struct of_device *ofdev,
                dev_printk(KERN_ERR, &ofdev->dev, "invalid irq from platform\n");
                goto error_exit_with_cleanup;
        }
+       host_priv->irq = irq;
 
        /* allocate host structure */
        host = ata_host_alloc_pinfo(&ofdev->dev, ppi, SATA_FSL_MAX_PORTS);
@@ -1445,7 +1447,7 @@ static int sata_fsl_remove(struct of_device *ofdev)
 
        dev_set_drvdata(&ofdev->dev, NULL);
 
-       irq_dispose_mapping(host->irq);
+       irq_dispose_mapping(host_priv->irq);
        iounmap(host_priv->hcr_base);
        kfree(host_priv);