Messages in this thread | | | From | "Rafael J. Wysocki" <> | Subject | Re: [PATCH] PM / Sleep: Print name of wakeup source that aborts suspend | Date | Fri, 20 Jul 2012 11:55:24 +0200 |
| |
On Friday, July 20, 2012, Todd Poynor wrote: > On Wed, Jul 18, 2012 at 09:47:34PM +0200, Rafael J. Wysocki wrote: > > On Wednesday, July 18, 2012, Todd Poynor wrote: > ... > > > +{ > > > + struct wakeup_source *ws; > > > + int active = 0; > > > + struct wakeup_source *last_activity_ws = NULL; > > > + > > > + rcu_read_lock(); > > > + list_for_each_entry_rcu(ws, &wakeup_sources, entry) { > > > + if (ws->active) { > > > + pr_info("active wakeup source: %s\n", ws->name); > > > + active = 1; > > > > Can we do a break here? Or do we want to get all of them? > > I haven't seen more than 3 activated during suspend entry at a time, but > could just list one. I haven't made that change yet but will if it's > preferred.
That depend on what your needs are. For debugging purposes it probably is better to print them all.
Thanks, Rafael
| |