Commit 79b3edc9 authored by Li Yang's avatar Li Yang Committed by Jeff Garzik

ata/sata_fsl: save irq in private data for irq unmapping

Powerpc uses virtual irq which has to be unmapped.
Signed-off-by: default avatarLi Yang <leoli@freescale.com>
Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
parent 27c96eaa
...@@ -265,6 +265,7 @@ struct sata_fsl_host_priv { ...@@ -265,6 +265,7 @@ struct sata_fsl_host_priv {
void __iomem *hcr_base; void __iomem *hcr_base;
void __iomem *ssr_base; void __iomem *ssr_base;
void __iomem *csr_base; void __iomem *csr_base;
int irq;
}; };
static inline unsigned int sata_fsl_tag(unsigned int tag, static inline unsigned int sata_fsl_tag(unsigned int tag,
...@@ -1399,6 +1400,7 @@ static int sata_fsl_probe(struct of_device *ofdev, ...@@ -1399,6 +1400,7 @@ static int sata_fsl_probe(struct of_device *ofdev,
dev_printk(KERN_ERR, &ofdev->dev, "invalid irq from platform\n"); dev_printk(KERN_ERR, &ofdev->dev, "invalid irq from platform\n");
goto error_exit_with_cleanup; goto error_exit_with_cleanup;
} }
host_priv->irq = irq;
/* allocate host structure */ /* allocate host structure */
host = ata_host_alloc_pinfo(&ofdev->dev, ppi, SATA_FSL_MAX_PORTS); 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) ...@@ -1445,7 +1447,7 @@ static int sata_fsl_remove(struct of_device *ofdev)
dev_set_drvdata(&ofdev->dev, NULL); dev_set_drvdata(&ofdev->dev, NULL);
irq_dispose_mapping(host->irq); irq_dispose_mapping(host_priv->irq);
iounmap(host_priv->hcr_base); iounmap(host_priv->hcr_base);
kfree(host_priv); kfree(host_priv);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment