linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
To: Paul Mundt <lethal@linux-sh.org>
Cc: spi-devel-general@lists.sourceforge.net,
	linux-sh@vger.kernel.org,
	Grant Likely <grant.likely@secretlab.ca>
Subject: Re: [PATCH 1/2] SPI: spi_sh_msiof: implement DMA support
Date: Mon, 5 Sep 2011 09:26:45 +0200 (CEST)	[thread overview]
Message-ID: <Pine.LNX.4.64.1109050925170.13066@axis700.grange> (raw)
In-Reply-To: <20110905045911.GE22142@linux-sh.org>

Hi Paul

On Mon, 5 Sep 2011, Paul Mundt wrote:

> On Fri, Sep 02, 2011 at 05:13:31PM +0200, Guennadi Liakhovetski wrote:
> > Use the sh_dma dmaengine driver to support DMA on MSIOF.
> > 
> > Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
> 
> No real opinion one way or the other, just a couple observations.
> 
> > +static void sh_msiof_request_dma(struct sh_msiof_spi_priv *p)
> > +{
> ..
> > +	p->dummypage = alloc_page(GFP_KERNEL);
> > +	if (!p->dummypage)
> > +		return;
> > +
> ..
> > +echantx:
> > +	__free_pages(p->dummypage, 0);
> > +}
> > +
> alloc_page() can be balanced out with __free_page().

Hm, indeed, wondering, how I missed it.

> > @@ -695,11 +1030,11 @@ static int sh_msiof_spi_remove(struct platform_device *pdev)
> >  
> >  	ret = spi_bitbang_stop(&p->bitbang);
> >  	if (!ret) {
> > +		sh_msiof_release_dma(p);
> >  		pm_runtime_disable(&pdev->dev);
> >  		free_irq(platform_get_irq(pdev, 0), p);
> >  		iounmap(p->mapbase);
> >  		clk_put(p->clk);
> > -		spi_master_put(p->bitbang.master);
> >  	}
> >  	return ret;
> >  }
> 
> You've also killed off the spi_master_put() here.

Yes, spi_bitbang_stop() does it all already.

Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/

  reply	other threads:[~2011-09-05  7:26 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-02 15:13 [PATCH 0/2] SPI: spi-sh-msiof: add DMA support Guennadi Liakhovetski
2011-09-02 15:13 ` [PATCH 1/2] SPI: spi_sh_msiof: implement " Guennadi Liakhovetski
2011-09-05  4:59   ` Paul Mundt
2011-09-05  7:26     ` Guennadi Liakhovetski [this message]
2011-09-06 22:16       ` Magnus Damm
2011-09-12  9:27   ` [PATCH 0/2 v2] spi: MSIOF: unbalanced spi_master_put() + DMA Guennadi Liakhovetski
2011-09-12  9:27     ` [PATCH 1/2 v2] SPI: spi-sh-msiof: remove unbalanced spi_master_put() Guennadi Liakhovetski
2011-09-12  9:27     ` [PATCH 2/2 v2] SPI: spi_sh_msiof: implement DMA support Guennadi Liakhovetski
2011-09-02 15:13 ` [PATCH 2/2] sh: use DMA with MSIOF SPI on the sh7724 ecovec board Guennadi Liakhovetski

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=Pine.LNX.4.64.1109050925170.13066@axis700.grange \
    --to=g.liakhovetski@gmx.de \
    --cc=grant.likely@secretlab.ca \
    --cc=lethal@linux-sh.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=spi-devel-general@lists.sourceforge.net \
    /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).