[PATCH 6/7] fsl_pmc: Add API to enable device as wakeup event source

Zhao Chenhui chenhui.zhao at freescale.com
Mon Nov 7 22:24:11 EST 2011


On Fri, Nov 04, 2011 at 07:08:24PM -0500, Tabi Timur-B04825 wrote:
> On Fri, Nov 4, 2011 at 7:39 AM, Zhao Chenhui <chenhui.zhao at freescale.com> wrote:
> 
> > +       if (!pmc_regs) {
> > +               printk(KERN_WARNING "PMC is unavailable\n");
> 
> Use pr_warn() and the other pr_xxx functions.
> 
> > +       pmcdr_mask = (u32 *)of_get_property(clk_np, "fsl,pmcdr-mask", NULL);
> 
> The typecast is unnecessary here.
> 
> > +       /* clear to enable clock in low power mode */
> > +       if (enable)
> > +               clrbits32(&pmc_regs->pmcdr, *pmcdr_mask);
> > +       else
> > +               setbits32(&pmc_regs->pmcdr, *pmcdr_mask);
> 
> You need to use be32_to_cpup() when dereferencing a pointer to a
> device tree property.
> 
> -- 
> Timur Tabi
> Linux kernel developer at Freescale

Thanks. I will fix them all.

-chenhui



More information about the Linuxppc-dev mailing list