Subject: Re: [PATCH v3]: Fix e500 v2 core reboot bug

From: Zang Roy-r61911 <[email-masked]>
Date: 13 Jun 2007 13:45:02 +0800

On Wed, 2007-06-13 at 12:44, Segher Boessenkool wrote:
> > +             global-utilities@e0000 {        //global utilities reg
> > +                     compatible = "fsl,mpc8548-guts";
> > +                     reg = <e0000 1000>;
> > +                     fsl,has-rstcr;
> > +             };
> 
> Looks good.
> 
> > +     np = of_find_node_by_name(NULL, "global-utilities");
> > +     if ((np && of_get_property(np, "fsl,has-rstcr", NULL))) {
> > +             const u32 *prop = of_get_property(np, "reg", NULL);
> > +             if (prop) {
> > +             /* map reset control register
> > +              * 0xE00B0 is offset of reset control register
> > +              */
> > +                     rstcr = ioremap(get_immrbase() + *prop + 0xB0,
> 0xff);
> > +                     if (!rstcr)
> > +                             printk (KERN_EMERG "Error: reset
> control register not mapped, 
> > spinning!\n");
> > +             }
> > +     else
> > +             printk (KERN_INFO "rstcr compatible register does not
> exist!\n");
> > +     }
> 
> This needs an of_node_put(np).  Oh and the indenting
> is off.
It is my oversight!
I had thought to add of_node_put(), but forget.
I just checkout the code and decide to have a small revise.

Thanks.
Roy