On Wed, Aug 14, 2013 at 01:55:27PM +0400, Vadim Zhukov wrote:
> 2013/8/13 Landry Breuil <lan...@rhaalovely.net>:
> > On Mon, Aug 12, 2013 at 06:01:25PM +0200, David Coppa wrote:
> >> On Mon, Aug 12, 2013 at 5:40 PM, Landry Breuil <lan...@rhaalovely.net> 
> >> wrote:
> >                  * _LID method.  0 means the lid is closed and we
> >                  * should go to sleep.
> >                  */
> > -               if (lid_suspend == 0)
> > -                       break;
> >                 if (aml_evalinteger(sc->sc_acpi, sc->sc_devnode,
> >                     "_LID", 0, NULL, &lid))
> >                         return (0);
> > +               sc->sc_sens.value = lid;
> > +               if (lid_suspend == 0)
> > +                       break;
> 
> Probably a stupid question, but is it safe to call aml_evalinteger()
> when we're suspending (lid_suspend!=0)?

In that context, lid_suspend maps to machdep.lidsuspend, which means 'i
want to suspend if the lid is being closed'. The actual 'going to sleep'
is done just below, so WRT aml_evalinteger it changes nothing.

> >                 if (lid == 0)
> >                         goto sleep;
> >  #endif /* SMALL_KERNEL */

Landry

Reply via email to