* [PATCH 2/2] dma: pl08x: allow zero slave channels
@ 2013-12-13 23:16 Linus Walleij
2013-12-18 16:28 ` Vinod Koul
0 siblings, 1 reply; 2+ messages in thread
From: Linus Walleij @ 2013-12-13 23:16 UTC (permalink / raw)
To: Vinod Koul; +Cc: linux-kernel, Linus Walleij
It might happen that a platform wants to use its DMA engine for
memcpy only, and then we have zero slave channels to initialize,
so allow the slave initialization to return zero.
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
drivers/dma/amba-pl08x.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/dma/amba-pl08x.c b/drivers/dma/amba-pl08x.c
index ec4ee5c1fe9d..f68f1c1d560b 100644
--- a/drivers/dma/amba-pl08x.c
+++ b/drivers/dma/amba-pl08x.c
@@ -2167,7 +2167,7 @@ static int pl08x_probe(struct amba_device *adev, const struct amba_id *id)
/* Register slave channels */
ret = pl08x_dma_init_virtual_channels(pl08x, &pl08x->slave,
pl08x->pd->num_slave_channels, true);
- if (ret <= 0) {
+ if (ret < 0) {
dev_warn(&pl08x->adev->dev,
"%s failed to enumerate slave channels - %d\n",
__func__, ret);
--
1.8.3.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 2/2] dma: pl08x: allow zero slave channels
2013-12-13 23:16 [PATCH 2/2] dma: pl08x: allow zero slave channels Linus Walleij
@ 2013-12-18 16:28 ` Vinod Koul
0 siblings, 0 replies; 2+ messages in thread
From: Vinod Koul @ 2013-12-18 16:28 UTC (permalink / raw)
To: Linus Walleij; +Cc: linux-kernel
On Sat, Dec 14, 2013 at 12:16:23AM +0100, Linus Walleij wrote:
> It might happen that a platform wants to use its DMA engine for
> memcpy only, and then we have zero slave channels to initialize,
> so allow the slave initialization to return zero.
>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Applied, this one
--
~Vinod
> ---
> drivers/dma/amba-pl08x.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/dma/amba-pl08x.c b/drivers/dma/amba-pl08x.c
> index ec4ee5c1fe9d..f68f1c1d560b 100644
> --- a/drivers/dma/amba-pl08x.c
> +++ b/drivers/dma/amba-pl08x.c
> @@ -2167,7 +2167,7 @@ static int pl08x_probe(struct amba_device *adev, const struct amba_id *id)
> /* Register slave channels */
> ret = pl08x_dma_init_virtual_channels(pl08x, &pl08x->slave,
> pl08x->pd->num_slave_channels, true);
> - if (ret <= 0) {
> + if (ret < 0) {
> dev_warn(&pl08x->adev->dev,
> "%s failed to enumerate slave channels - %d\n",
> __func__, ret);
> --
> 1.8.3.1
>
--
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-12-18 17:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-13 23:16 [PATCH 2/2] dma: pl08x: allow zero slave channels Linus Walleij
2013-12-18 16:28 ` Vinod Koul
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox