[U-Boot] [PATCH][v2]powerpc/8xxx:Add MPH controller support in USB device-tree fixup

Tabi Timur-B04825 B04825 at freescale.com
Tue Feb 7 15:06:52 CET 2012


On Mon, Feb 6, 2012 at 11:17 PM, Ramneek Mehresh
<ramneek.mehresh at freescale.com> wrote:
>
> +                       start_offset, compat_mph);
>        if (node_offset < 0) {
> -               printf("WARNING: could not find compatible node %s: %s.\n",
> -                       compat, fdt_strerror(node_offset));
> -               return -1;
> -       }
> +               node_offset = fdt_node_offset_by_compatible(blob,
> +                       start_offset, compat_dr);
> +               if (node_offset < 0) {
> +                       printf("WARNING: could not find compatible"
> +                               " node %s or %s: %s.\n", compat_mph,
> +                               compat_dr, fdt_strerror(node_offset));
> +                       return -1;
> +               } else
> +                       node_type = (char *)compat_dr;
> +       } else
> +               node_type = (char *)compat_mph;

If you make node_type into a const char *, can you remove these typecasts?

-- 
Timur Tabi
Linux kernel developer at Freescale


More information about the U-Boot mailing list