On Mon, 2008-12-29 at 13:11 +0100, Johannes Berg wrote: > On Mon, 2008-12-29 at 15:53 -0800, Vivek Natarajan wrote: > > > +#define ATH9K_PS_WAKEUP(sc) \ > > + do { \ > > + if (!atomic_read(&sc->ps_usecount) && \ > > + (ah->ah_powerMode != ATH9K_PM_AWAKE)) { \ > > + ah->ah_restoreMode = ah->ah_powerMode; \ > > + ath9k_hw_setpower(sc->sc_ah, ATH9K_PM_AWAKE); \ > > + } \ > > + atomic_inc(&sc->ps_usecount); \ > > + } while (0); Also, this seems racy, shouldn't it use something like if (atomic_inc_return() == 1) ? johannes
Attachment:
signature.asc
Description: This is a digitally signed message part