From: Grant Likely <grant.likely@secretlab.ca>
To: Shubhrajyoti D <shubhrajyoti@ti.com>
Cc: spi-devel-general@lists.sourceforge.net,
linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH] OMAP: SPI: Fix the trying to free nonexistent resource error
Date: Mon, 24 Oct 2011 13:45:07 +0200 [thread overview]
Message-ID: <20111024114507.GK8708@ponder.secretlab.ca> (raw)
In-Reply-To: <1319451864-8212-1-git-send-email-shubhrajyoti@ti.com>
On Mon, Oct 24, 2011 at 03:54:24PM +0530, Shubhrajyoti D wrote:
> Currently there is a request_mem_region(r->start, ..
> followed by r->start += pdata->regs_offset;
>
> And then in remove
>
> r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> release_mem_region(r->start, resource_size(r));
>
> Here the offset addition is not taken care. Fix the code for the
> same.
>
> Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com>
Applied, thanks.
g.
> ---
> drivers/spi/spi-omap2-mcspi.c | 6 +++---
> 1 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/spi/spi-omap2-mcspi.c b/drivers/spi/spi-omap2-mcspi.c
> index 06dc9a9..471b0f3 100644
> --- a/drivers/spi/spi-omap2-mcspi.c
> +++ b/drivers/spi/spi-omap2-mcspi.c
> @@ -1123,15 +1123,15 @@ static int __init omap2_mcspi_probe(struct platform_device *pdev)
> status = -ENODEV;
> goto err1;
> }
> + r->start += pdata->regs_offset;
> + r->end += pdata->regs_offset;
> + mcspi->phys = r->start;
> if (!request_mem_region(r->start, resource_size(r),
> dev_name(&pdev->dev))) {
> status = -EBUSY;
> goto err1;
> }
>
> - r->start += pdata->regs_offset;
> - r->end += pdata->regs_offset;
> - mcspi->phys = r->start;
> mcspi->base = ioremap(r->start, resource_size(r));
> if (!mcspi->base) {
> dev_dbg(&pdev->dev, "can't ioremap MCSPI\n");
> --
> 1.7.1
>
>
> ------------------------------------------------------------------------------
> The demand for IT networking professionals continues to grow, and the
> demand for specialized networking skills is growing even more rapidly.
> Take a complimentary Learning@Cisco Self-Assessment and learn
> about Cisco certifications, training, and career opportunities.
> http://p.sf.net/sfu/cisco-dev2dev
> _______________________________________________
> spi-devel-general mailing list
> spi-devel-general@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/spi-devel-general
prev parent reply other threads:[~2011-10-24 11:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-24 10:24 [PATCH] OMAP: SPI: Fix the trying to free nonexistent resource error Shubhrajyoti D
2011-10-24 11:45 ` Grant Likely [this message]
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=20111024114507.GK8708@ponder.secretlab.ca \
--to=grant.likely@secretlab.ca \
--cc=linux-kernel@vger.kernel.org \
--cc=shubhrajyoti@ti.com \
--cc=spi-devel-general@lists.sourceforge.net \
--cc=stable@vger.kernel.org \
/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).