Re: [PATCH 2/4] MIPS: lantiq: adds minimal dcdc driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello.

On 08-08-2013 15:17, Florian Fainelli wrote:

This driver so far only reads the core voltage.

Signed-off-by: John Crispin <blogic@xxxxxxxxxxx>

[...]

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 @@

[...]

+
+       /* 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().

This is the first time that I read this, lib/devres.c internal returns
-ENOMEM when an ioremap() call fails

   What if the other call fails?

(see devm_ioremap_resource),
-EADDRNOTAVAIL really is for networking matter, this is not.

   Just see the comment accompanying devm_request_and_ioremap().

WBR, Sergei



[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux