From: Vinod Koul <vinod.koul-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
To: Robert Jarzmik <robert.jarzmik-GANU6spQydw@public.gmane.org>
Cc: Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
Pawel Moll <pawel.moll-5wv7dgnIgG8@public.gmane.org>,
Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>,
Ian Campbell
<ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org>,
Kumar Gala <galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>,
Daniel Mack <daniel-cYrQPVfZoowdnm+yROfE0A@public.gmane.org>,
Haojian Zhuang
<haojian.zhuang-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
dmaengine-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 4/4] dmaengine: pxa_dma: fix the maximum requestor line
Date: Mon, 15 Feb 2016 22:05:24 +0530 [thread overview]
Message-ID: <20160215163524.GI19598@localhost> (raw)
In-Reply-To: <1455225798-9510-5-git-send-email-robert.jarzmik-GANU6spQydw@public.gmane.org>
On Thu, Feb 11, 2016 at 10:23:18PM +0100, Robert Jarzmik wrote:
> @@ -1399,13 +1405,17 @@ static int pxad_probe(struct platform_device *op)
> return PTR_ERR(pdev->base);
>
> of_id = of_match_device(pxad_dt_ids, &op->dev);
> - if (of_id)
> + if (of_id) {
> of_property_read_u32(op->dev.of_node, "#dma-channels",
> &dma_channels);
> - else if (pdata && pdata->dma_channels)
> + of_property_read_u32(op->dev.of_node, "#requestors",
> + &nb_requestors);
I think we should check the return value here. This might be err in case
when we have older DT on platform, but still should work with default in
that case
> + } else if (pdata && pdata->dma_channels) {
> dma_channels = pdata->dma_channels;
> - else
> + nb_requestors = pdata->nb_requestors;
> + } else {
> dma_channels = 32; /* default 32 channel */
> + }
--
~Vinod
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2016-02-15 16:35 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-11 21:23 [PATCH 0/4] Fix pxa dma requestor lines Robert Jarzmik
2016-02-11 21:23 ` [PATCH 1/4] dma: mmp_pdma: Add the #requestors DT property documentation Robert Jarzmik
[not found] ` <1455225798-9510-2-git-send-email-robert.jarzmik-GANU6spQydw@public.gmane.org>
2016-02-11 21:59 ` Arnd Bergmann
2016-02-12 20:55 ` Robert Jarzmik
2016-02-11 21:23 ` [PATCH 2/4] dmaengine: mmp-pdma: add number of requestors Robert Jarzmik
2016-02-11 21:23 ` [PATCH 3/4] ARM: pxa: add the number of DMA requestor lines Robert Jarzmik
2016-02-11 21:23 ` [PATCH 4/4] dmaengine: pxa_dma: fix the maximum requestor line Robert Jarzmik
[not found] ` <1455225798-9510-5-git-send-email-robert.jarzmik-GANU6spQydw@public.gmane.org>
2016-02-15 16:35 ` Vinod Koul [this message]
2016-02-15 17:24 ` Robert Jarzmik
[not found] ` <87fuwt28eu.fsf-4ty26DBLk+jEm7gnYqmdkQ@public.gmane.org>
2016-02-15 17:33 ` Vinod Koul
2016-02-15 18:22 ` Robert Jarzmik
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=20160215163524.GI19598@localhost \
--to=vinod.koul-ral2jqcrhueavxtiumwx3w@public.gmane.org \
--cc=daniel-cYrQPVfZoowdnm+yROfE0A@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=dmaengine-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
--cc=haojian.zhuang-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
--cc=pawel.moll-5wv7dgnIgG8@public.gmane.org \
--cc=robert.jarzmik-GANU6spQydw@public.gmane.org \
--cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.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