diff options
-rw-r--r-- | drivers/ata/sata_mv.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c index eb97dde28d47..6ebebde8454a 100644 --- a/drivers/ata/sata_mv.c +++ b/drivers/ata/sata_mv.c | |||
@@ -2947,7 +2947,8 @@ static int mv_platform_probe(struct platform_device *pdev) | |||
2947 | hpriv->n_ports = n_ports; | 2947 | hpriv->n_ports = n_ports; |
2948 | 2948 | ||
2949 | host->iomap = NULL; | 2949 | host->iomap = NULL; |
2950 | hpriv->base = ioremap(res->start, res->end - res->start + 1); | 2950 | hpriv->base = devm_ioremap(&pdev->dev, res->start, |
2951 | res->end - res->start + 1); | ||
2951 | hpriv->base -= MV_SATAHC0_REG_BASE; | 2952 | hpriv->base -= MV_SATAHC0_REG_BASE; |
2952 | 2953 | ||
2953 | rc = mv_create_dma_pools(hpriv, &pdev->dev); | 2954 | rc = mv_create_dma_pools(hpriv, &pdev->dev); |
@@ -2979,11 +2980,8 @@ static int __devexit mv_platform_remove(struct platform_device *pdev) | |||
2979 | { | 2980 | { |
2980 | struct device *dev = &pdev->dev; | 2981 | struct device *dev = &pdev->dev; |
2981 | struct ata_host *host = dev_get_drvdata(dev); | 2982 | struct ata_host *host = dev_get_drvdata(dev); |
2982 | struct mv_host_priv *hpriv = host->private_data; | ||
2983 | void __iomem *base = hpriv->base; | ||
2984 | 2983 | ||
2985 | ata_host_detach(host); | 2984 | ata_host_detach(host); |
2986 | iounmap(base); | ||
2987 | return 0; | 2985 | return 0; |
2988 | } | 2986 | } |
2989 | 2987 | ||