From: Huang Shijie <sjhuang@iluvatar.ai>
To: Peter Ujfalusi <peter.ujfalusi@ti.com>
Cc: vkoul@kernel.org, dmaengine@vger.kernel.org,
linux-kernel@vger.kernel.org, dave.jiang@intel.com,
radhey.shyam.pandey@xilinx.com, appana.durga.rao@xilinx.com,
jmkrzyszt@gmail.com, gomonovych@gmail.com, keescook@chromium.org,
horms+renesas@verge.net.au, geert+renesas@glider.be,
shawnguo@kernel.org, baoyou.xie@linaro.org,
michal.simek@xilinx.com, baohua@kernel.org,
ludovic.desroches@microchip.com, linus.walleij@linaro.org,
david.brown@linaro.org
Subject: [08/46] dmaengine: edma: use dmaenginem_async_device_register to simplify the code
Date: Fri, 3 Aug 2018 15:54:35 +0800 [thread overview]
Message-ID: <20180803075434.GB29473@hsj-Precision-5520> (raw)
On Fri, Aug 03, 2018 at 10:50:13AM +0300, Peter Ujfalusi wrote:
>
>
> On 2018-08-03 10:19, Huang Shijie wrote:
> > Use dmaenginem_async_device_register to simplify the code:
> > remove dma_async_device_unregister
> >
> > Signed-off-by: Huang Shijie <sjhuang@iluvatar.ai>
> > ---
> > drivers/dma/ti/edma.c | 8 ++------
> > 1 file changed, 2 insertions(+), 6 deletions(-)
> >
> > diff --git a/drivers/dma/ti/edma.c b/drivers/dma/ti/edma.c
> > index ceabdea40ae0..28ba1e722c47 100644
> > --- a/drivers/dma/ti/edma.c
> > +++ b/drivers/dma/ti/edma.c
> > @@ -2388,18 +2388,17 @@ static int edma_probe(struct platform_device *pdev)
> > ecc->dma_slave.filter.mapcnt = info->slavecnt;
> > ecc->dma_slave.filter.fn = edma_filter_fn;
> >
> > - ret = dma_async_device_register(&ecc->dma_slave);
> > + ret = dmaenginem_async_device_register(&ecc->dma_slave);
> > if (ret) {
> > dev_err(dev, "slave ddev registration failed (%d)\n", ret);
> > goto err_reg1;
> > }
> >
> > if (ecc->dma_memcpy) {
> > - ret = dma_async_device_register(ecc->dma_memcpy);
> > + ret = dmaenginem_async_device_register(ecc->dma_memcpy);
> > if (ret) {
> > dev_err(dev, "memcpy ddev registration failed (%d)\n",
> > ret);
> > - dma_async_device_unregister(&ecc->dma_slave);
> > goto err_reg1;
> > }
> > }
> > @@ -2439,9 +2438,6 @@ static int edma_remove(struct platform_device *pdev)
> >
> > if (dev->of_node)
> > of_dma_controller_free(dev->of_node);
> > - dma_async_device_unregister(&ecc->dma_slave);
> > - if (ecc->dma_memcpy)
> > - dma_async_device_unregister(ecc->dma_memcpy);
>
> I'm afraid this is not safe either, we need to free the dummy_slot
> _after_ the dma device is unregistered.
>
Thanks for pointing this.
I will drop this patch ...
Thanks
Huang Shijie
---
To unsubscribe from this list: send the line "unsubscribe dmaengine" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next reply other threads:[~2018-08-03 7:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-03 7:54 Huang Shijie [this message]
-- strict thread matches above, loose matches on Subject: below --
2018-08-03 7:50 [08/46] dmaengine: edma: use dmaenginem_async_device_register to simplify the code Peter Ujfalusi
2018-08-03 7:19 Huang Shijie
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=20180803075434.GB29473@hsj-Precision-5520 \
--to=sjhuang@iluvatar.ai \
--cc=appana.durga.rao@xilinx.com \
--cc=baohua@kernel.org \
--cc=baoyou.xie@linaro.org \
--cc=dave.jiang@intel.com \
--cc=david.brown@linaro.org \
--cc=dmaengine@vger.kernel.org \
--cc=geert+renesas@glider.be \
--cc=gomonovych@gmail.com \
--cc=horms+renesas@verge.net.au \
--cc=jmkrzyszt@gmail.com \
--cc=keescook@chromium.org \
--cc=linus.walleij@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ludovic.desroches@microchip.com \
--cc=michal.simek@xilinx.com \
--cc=peter.ujfalusi@ti.com \
--cc=radhey.shyam.pandey@xilinx.com \
--cc=shawnguo@kernel.org \
--cc=vkoul@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