Hi Olof,

Just a couple of small things ...

On Sun, 4 Nov 2007 15:37:09 -0600 Olof Johansson <[EMAIL PROTECTED]> wrote:
>
> +             ip = of_get_property(phy_dn, "interrupts", NULL);
> +             regp = of_get_property(phy_dn, "reg", NULL);
> +             if (!ip || !regp)
> +                     continue;
> +             new_bus->irq[*regp] = irq_create_mapping(NULL, *ip);

Paranoid me says to check that *regp is in range.

>  int gpio_mdio_init(void)
>  {
> +     struct device_node *np;
> +
> +     np = of_find_compatible_node(NULL, "gpio", "1682m-gpio");
> +     if (!np)
> +             return -ENODEV;
> +     gpio_regs = of_iomap(np, 0);

        of_node_put(np);                ?

> +     if (!gpio_regs)
> +             return -ENODEV;
> +
>       return of_register_platform_driver(&gpio_mdio_driver);
>  }
-- 
Cheers,
Stephen Rothwell                    [EMAIL PROTECTED]
http://www.canb.auug.org.au/~sfr/

Attachment: pgpNJmusDMWKX.pgp
Description: PGP signature

_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev

Reply via email to