Re: [PATCH] ACPI LID: increment wakeup count only when notified.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Rafael,

On Wed, Jun 06, 2018 at 09:00:43AM +0200, Rafael J. Wysocki wrote:
> > @@ -417,6 +414,7 @@ static void acpi_button_notify(struct acpi_device *device, u32 event)
> >                 /* fall through */
> >         case ACPI_BUTTON_NOTIFY_STATUS:
> >                 input = button->input;
> > +               acpi_pm_wakeup_event(&device->dev);
> 
> Not really.
> 
> There already is an acpi_pm_wakeup_event() call in the else branch below.
>

Ravi removes that other call below. The intent for this is to call
acpi_pm_wakeup_event() regardless if the button->type is ACPI_BUTTON_TYPE_LID,
in case that event is ACPI_BUTTON_NOTIFY_STATUS.
 
> >                 if (button->type == ACPI_BUTTON_TYPE_LID) {
> >                         mutex_lock(&button->input->mutex);
> >                         users = button->input->users;
> > @@ -426,7 +424,6 @@ static void acpi_button_notify(struct acpi_device *device, u32 event)
> >                 } else {
> >                         int keycode;
> >
> > -                       acpi_pm_wakeup_event(&device->dev);
> >                         if (button->suspended)
> >                                 break;
> >
> > --

Thanks!
Benson
-- 
Benson Leung
Staff Software Engineer
Chrome OS Kernel
Google Inc.
bleung@xxxxxxxxxx
Chromium OS Project
bleung@xxxxxxxxxxxx

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux