Re: [PATCH v9 4/6] ARM: davinci: Add a remoteproc driver implementation for OMAP-L13x DSP

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

 



Hello.

On 04/07/2013 05:02 PM, Ohad Ben-Cohen wrote:


+static int da8xx_rproc_probe(struct platform_device *pdev)
+{
+       struct device *dev = &pdev->dev;
+       struct da8xx_rproc *drproc;
+       struct rproc *rproc;
+       struct irq_data *irq_data;
+       struct resource *bootreg_res;
+       struct resource *chipsig_res;
+       struct clk *dsp_clk;
+       void __iomem *chipsig;
+       void __iomem *bootreg;
+       int irq;
+       int ret;
+
[...]
+       bootreg = devm_request_and_ioremap(dev, bootreg_res);
+       if (!bootreg) {
+               dev_err(dev, "unable to map boot register\n");
+               return -EADDRNOTAVAIL;
+       }
+
+       chipsig = devm_request_and_ioremap(dev, chipsig_res);

   I suggest that you use more modern (yes, already a newer interface :-)
devm_ioremap_resource() instead -- it returns the error code (as a pointer)
in case of error, and it certainly doesn't require you to print error messages.

+       if (!chipsig) {
+               dev_err(dev, "unable to map CHIPSIG register\n");
+               return -EADDRNOTAVAIL;
+       }


WBR, Sergei

--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux