On Wed, Jan 14, 2009 at 1:48 AM, Nigel Cunningham <ncunningham@xxxxxxxxxxx> wrote: >> +enum { >> + DEBUG_USER_STATE = 1U << 0, >> + DEBUG_SUSPEND = 1U << 2, >> +}; > > Is there a reason DEBUG_SUSPEND isn't 1U << 1? If so, it might be good > to document that here. > No. I missed it when separating the wake lock and early suspend code. >> + if (debug_mask & DEBUG_SUSPEND) >> + pr_info("early_suspend: sync\n"); >> + >> + sys_sync(); > > Why the sync here? At this point the device appears to asleep to the user but wakelocks can prevent full suspend (which also calls sys_sync). >> + if (state == SUSPENDED) >> + state &= ~SUSPENDED; > > Why not just say state = 0? > Only the SUSPENDED bit may be modified here, but in this case state = 0 is safe. -- Arve Hjønnevåg _______________________________________________ linux-pm mailing list linux-pm@xxxxxxxxxxxxxxxxxxxxxxxxxx https://lists.linux-foundation.org/mailman/listinfo/linux-pm