mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-07-23 00:27:30 -04:00
ACPI: button: Eliminate redundant conditional statement
Simplify do_update initialization in acpi_lid_notify_state() by assigning the value of the condition it depends on directly to it. No intentional functional impact. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Link: https://patch.msgid.link/10868292.nUPlyArG6x@rafael.j.wysocki
This commit is contained in:
@@ -217,12 +217,8 @@ static void acpi_lid_notify_state(struct acpi_button *button, bool state)
|
||||
* So "last_time" is only updated after a timeout or an actual
|
||||
* switch.
|
||||
*/
|
||||
if (lid_init_state != ACPI_BUTTON_LID_INIT_IGNORE ||
|
||||
button->last_state != state)
|
||||
do_update = true;
|
||||
else
|
||||
do_update = false;
|
||||
|
||||
do_update = lid_init_state != ACPI_BUTTON_LID_INIT_IGNORE ||
|
||||
button->last_state != state;
|
||||
next_report = ktime_add(button->last_time,
|
||||
ms_to_ktime(lid_report_interval));
|
||||
if (button->last_state == state &&
|
||||
|
||||
Reference in New Issue
Block a user