Re: [PATCH v2 1/2] MX2: Add platform definitions for eMMa-PrP device.

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

 



On 22 November 2011 20:29, Sylwester Nawrocki <snjw23@xxxxxxxxx> wrote:
> Hi Javier,
>> +struct platform_device *__init imx_alloc_mx2_emmaprp(
>> +             const struct imx_mx2_camera_data *data)
>> +{
>> +     struct resource res[] = {
>> +             {
>> +                     .start = data->iobaseemmaprp,
>> +                     .end = data->iobaseemmaprp + data->iosizeemmaprp - 1,
>> +                     .flags = IORESOURCE_MEM,
>> +             }, {
>> +                     .start = data->irqemmaprp,
>> +                     .end = data->irqemmaprp,
>> +                     .flags = IORESOURCE_IRQ,
>> +             },
>> +     };
>> +     struct platform_device *pdev;
>> +     int ret = -ENOMEM;
>> +
>> +     pdev = platform_device_alloc("m2m-emmaprp", 0);
>> +     if (!pdev)
>> +             goto err;
>> +
>> +     ret = platform_device_add_resources(pdev, res, ARRAY_SIZE(res));
>> +     if (ret)
>> +             goto err;
>> +
>> +     return pdev;
>> +err:
>> +     platform_device_put(pdev);
>> +     return ERR_PTR(-ENODEV);
>
> I guess you intended to have
>
> +       return ERR_PTR(ret);

Sure, thanks for the tip.

-- 
Javier Martin
Vista Silicon S.L.
CDTUC - FASE C - Oficina S-345
Avda de los Castros s/n
39005- Santander. Cantabria. Spain
+34 942 25 32 60
www.vista-silicon.com
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux