From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: John Crispin <blogic@openwrt.org>
Cc: Ralf Baechle <ralf@linux-mips.org>, linux-mips@linux-mips.org
Subject: Re: [PATCH 2/4] MIPS: lantiq: adds minimal dcdc driver
Date: Thu, 08 Aug 2013 14:58:28 +0400 [thread overview]
Message-ID: <520379D4.9040903@cogentembedded.com> (raw)
In-Reply-To: <1375952846-25812-2-git-send-email-blogic@openwrt.org>
Hello.
On 08-08-2013 13:07, John Crispin wrote:
> This driver so far only reads the core voltage.
> Signed-off-by: John Crispin <blogic@openwrt.org>
[...]
> diff --git a/arch/mips/lantiq/xway/dcdc.c b/arch/mips/lantiq/xway/dcdc.c
> new file mode 100644
> index 0000000..6361c30
> --- /dev/null
> +++ b/arch/mips/lantiq/xway/dcdc.c
> @@ -0,0 +1,75 @@
[...]
> +static int dcdc_probe(struct platform_device *pdev)
> +{
> + struct resource *res;
> +
> + res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> + if (!res) {
> + dev_err(&pdev->dev, "Failed to get resource\n");
> + return -ENOMEM;
> + }
You do not need to check this with devm_request_and_ioremap() or
devm_ioremap_resource().
> +
> + /* remap dcdc register range */
> + dcdc_membase = devm_request_and_ioremap(&pdev->dev, res);
Use devm_ioremap_resource().
> + if (!dcdc_membase) {
> + dev_err(&pdev->dev, "Failed to remap resource\n");
Error messages are already printed by devm_request_and_ioremap()
ordevm_ioremap_resource().
> + return -ENOMEM;
-EADDRNOTAVAIL is the right code for devm_request_and_ioremap().
WBR, Sergei
next prev parent reply other threads:[~2013-08-08 10:58 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-08 9:07 [PATCH 1/4] MIPS: lantiq: adds 4dword burst length for dma John Crispin
2013-08-08 9:07 ` [PATCH 2/4] MIPS: lantiq: adds minimal dcdc driver John Crispin
2013-08-08 10:58 ` Sergei Shtylyov [this message]
2013-08-08 11:17 ` Florian Fainelli
2013-08-08 11:50 ` Lars-Peter Clausen
2013-08-08 12:04 ` Sergei Shtylyov
2013-08-08 9:07 ` [PATCH 3/4] MIPS: lantiq: falcon: add cpu-feature-override.h John Crispin
2013-08-08 9:07 ` [PATCH 4/4] MIPS: lantiq: falcon: fix asc clock definition John Crispin
2013-08-08 9:49 ` [PATCH 1/4] MIPS: lantiq: adds 4dword burst length for dma Thomas Bogendoerfer
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=520379D4.9040903@cogentembedded.com \
--to=sergei.shtylyov@cogentembedded.com \
--cc=blogic@openwrt.org \
--cc=linux-mips@linux-mips.org \
--cc=ralf@linux-mips.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