On Tue, Aug 2, 2011 at 06:49, Tobias Klauser wrote:
> @@ -2755,12 +2805,31 @@ static int __devinit isp1362_probe(struct 
> platform_device *pdev)
>        INIT_LIST_HEAD(&isp1362_hcd->periodic);
>        INIT_LIST_HEAD(&isp1362_hcd->isoc);
>        INIT_LIST_HEAD(&isp1362_hcd->remove_list);
> -       isp1362_hcd->board = pdev->dev.platform_data;
> +
> +       pdata = pdev->dev.platform_data;
> +
> +       /* If no platform data is available, try to get it from device tree */
> +       if (!pdata) {
> +               pdata = kzalloc(sizeof(struct isp1362_platform_data), 
> GFP_KERNEL);

sizeof(*pdata)

the rest of the non-of code looks fine to me.  as for of, i havent
used it before, so i have no feedback on it as long as it's behind
CONFIG_OF (which it is).

Acked-by: Mike Frysinger <vap...@gentoo.org>
-mike
_______________________________________________
devicetree-discuss mailing list
devicetree-discuss@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/devicetree-discuss

Reply via email to