Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f1cb0ea12fee23018ad1865bf789cbd463f13747
Commit:     f1cb0ea12fee23018ad1865bf789cbd463f13747
Parent:     5d44b414daa8c1d8551aed6130d86d54175db43f
Author:     Saeed Bishara <[EMAIL PROTECTED]>
AuthorDate: Mon Feb 18 07:42:28 2008 -1100
Committer:  Jeff Garzik <[EMAIL PROTECTED]>
CommitDate: Wed Feb 20 12:20:46 2008 -0500

    sata_mv: remove iounmap in mv_platform_remove and use devm_iomap
    
    this will fix crash bug when doing rmmod to the driver, this is because the
    port_stop function get called later and it could access the device's 
registers.
    
    Signed-off-by: Saeed Bishara <[EMAIL PROTECTED]>
    Acked-by: Mark Lord <[EMAIL PROTECTED]>
    Acked-by: Tejun Heo <[EMAIL PROTECTED]>
    Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]>
---
 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 eb97dde..6ebebde 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)
        hpriv->n_ports = n_ports;
 
        host->iomap = NULL;
-       hpriv->base = ioremap(res->start, res->end - res->start + 1);
+       hpriv->base = devm_ioremap(&pdev->dev, res->start,
+                                  res->end - res->start + 1);
        hpriv->base -= MV_SATAHC0_REG_BASE;
 
        rc = mv_create_dma_pools(hpriv, &pdev->dev);
@@ -2979,11 +2980,8 @@ static int __devexit mv_platform_remove(struct 
platform_device *pdev)
 {
        struct device *dev = &pdev->dev;
        struct ata_host *host = dev_get_drvdata(dev);
-       struct mv_host_priv *hpriv = host->private_data;
-       void __iomem *base = hpriv->base;
 
        ata_host_detach(host);
-       iounmap(base);
        return 0;
 }
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to