Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1693796
| From | Andy Shevchenko <andy.shevchenko@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 2/3] ACPI / PM: Split acpi_device_wakeup() |
| Date | 2017-07-21 17:30 +0200 |
| Message-ID | <u5I2m-6wF-21@gated-at.bofh.it> (permalink) |
| References | <u5FHc-4X6-3@gated-at.bofh.it> <u5FHc-4X6-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Fri, Jul 21, 2017 at 3:40 PM, Rafael J. Wysocki <rjw@rjwysocki.net> wrote: > From: Rafael J. Wysocki <rafael.j.wysocki@intel.com> > > To prepare for a subsequent change and make the code somewhat easier > to follow, do the following in the ACPI device wakeup handling code: > > * Replace wakeup.flags.enabled under struct acpi_device with > wakeup.enable_count as that will be necessary going forward. > > For now, wakeup.enable_count is not allowed to grow beyond 1, > so the current behavior is retained. > > * Split acpi_device_wakeup() into acpi_device_wakeup_enable() > and acpi_device_wakeup_disable() and modify the callers of > it accordingly. > > * Introduce a new acpi_wakeup_lock mutex to protect the wakeup > enabling/disabling code from races in case it is executed > more than once in parallel for the same device (which may > happen for bridges theoretically). I prefer more self-explaining labels, though it's minor here To be constructive: out -> err_unlock out -> out_unlock or err_unlock (depends on context) > +out: > + mutex_unlock(&acpi_wakeup_lock); > + return error; > +out: > + mutex_unlock(&acpi_wakeup_lock); -- With Best Regards, Andy Shevchenko
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 2/3] ACPI / PM: Split acpi_device_wakeup() "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2017-07-21 15:00 +0200
Re: [PATCH 2/3] ACPI / PM: Split acpi_device_wakeup() Andy Shevchenko <andy.shevchenko@gmail.com> - 2017-07-21 17:30 +0200
Re: [PATCH 2/3] ACPI / PM: Split acpi_device_wakeup() "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2017-07-21 23:00 +0200
Re: [PATCH 2/3] ACPI / PM: Split acpi_device_wakeup() Andy Shevchenko <andy.shevchenko@gmail.com> - 2017-07-21 23:20 +0200
Re: [PATCH 2/3] ACPI / PM: Split acpi_device_wakeup() "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2017-07-21 23:30 +0200
Re: [PATCH 2/3] ACPI / PM: Split acpi_device_wakeup() "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2017-07-21 23:40 +0200
Re: [PATCH 2/3] ACPI / PM: Split acpi_device_wakeup() Andy Shevchenko <andy.shevchenko@gmail.com> - 2017-07-21 23:40 +0200
Re: [PATCH 2/3] ACPI / PM: Split acpi_device_wakeup() Mika Westerberg <mika.westerberg@linux.intel.com> - 2017-07-25 14:50 +0200
csiph-web