From: Mark Lord <liml@rtr.ca>
To: Saeed Bishara <saeed@marvell.com>
Cc: jeff@garzik.org, mlord@pobox.com, htejun@gmail.com,
linux-ide@vger.kernel.org, saeed.bishara@gmail.com,
byron.bbradley@gmail.com, tbm@cyrius.com
Subject: Re: [PATCH] sata_mv: remove iounmap in mv_platform_remove and use devm_iomap
Date: Mon, 18 Feb 2008 13:57:56 -0500 [thread overview]
Message-ID: <47B9D534.3090902@rtr.ca> (raw)
In-Reply-To: <12033601481951-git-send-email-saeed@marvell.com>
Saeed Bishara wrote:
> 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 <saeed@marvell.com>
> ---
> 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 9c9a5b0..f510448 100644
> --- a/drivers/ata/sata_mv.c
> +++ b/drivers/ata/sata_mv.c
> @@ -2951,7 +2951,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);
> @@ -2983,11 +2984,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;
> }
>
..
Acked0by: Mark Lord <mlord@pobox.com>
Looks correct to me.
next prev parent reply other threads:[~2008-02-18 18:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-18 18:42 [PATCH] sata_mv: remove iounmap in mv_platform_remove and use devm_iomap Saeed Bishara
2008-02-18 18:57 ` Mark Lord [this message]
2008-02-19 23:25 ` Tejun Heo
2008-02-20 17:21 ` Jeff Garzik
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=47B9D534.3090902@rtr.ca \
--to=liml@rtr.ca \
--cc=byron.bbradley@gmail.com \
--cc=htejun@gmail.com \
--cc=jeff@garzik.org \
--cc=linux-ide@vger.kernel.org \
--cc=mlord@pobox.com \
--cc=saeed.bishara@gmail.com \
--cc=saeed@marvell.com \
--cc=tbm@cyrius.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).