diff options
| author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2026-06-01 19:00:00 +0200 |
|---|---|---|
| committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2026-06-01 19:17:49 +0200 |
| commit | 06bc0064ad53be6b8f13b166b2fccbebe9eb6735 (patch) | |
| tree | a27ebe356eb23937a81bc90e3a3c9f987f33e2ed | |
| parent | a2a3659829b1062fa86eeecb7cb575fd3ba0338e (diff) | |
ACPI: button: Change return type of two functions to void
The return value of acpi_lid_notify_state() is always 0, so change
its return type to void.
Moreover, the return value of the only caller of that function,
acpi_lid_update_state(), is never used, so change its return type
to void either.
No intentional functional impact.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Link: https://patch.msgid.link/3429748.44csPzL39Z@rafael.j.wysocki
| -rw-r--r-- | drivers/acpi/button.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/acpi/button.c b/drivers/acpi/button.c index ae97c83bae2c..fcb2eed823c1 100644 --- a/drivers/acpi/button.c +++ b/drivers/acpi/button.c @@ -204,7 +204,7 @@ static int acpi_lid_evaluate_state(acpi_handle lid_handle) return !!lid_state; } -static int acpi_lid_notify_state(struct acpi_button *button, bool state) +static void acpi_lid_notify_state(struct acpi_button *button, bool state) { struct acpi_device *device = button->adev; ktime_t next_report; @@ -282,8 +282,6 @@ static int acpi_lid_notify_state(struct acpi_button *button, bool state) button->last_state = state; button->last_time = ktime_get(); } - - return 0; } static int __maybe_unused acpi_button_state_seq_show(struct seq_file *seq, @@ -407,19 +405,18 @@ int acpi_lid_open(void) } EXPORT_SYMBOL(acpi_lid_open); -static int acpi_lid_update_state(struct acpi_button *button, - bool signal_wakeup) +static void acpi_lid_update_state(struct acpi_button *button, bool signal_wakeup) { int state; state = acpi_lid_evaluate_state(button->adev->handle); if (state < 0) - return state; + return; if (state && signal_wakeup) acpi_pm_wakeup_event(button->dev); - return acpi_lid_notify_state(button, state); + acpi_lid_notify_state(button, state); } static void acpi_lid_initialize_state(struct acpi_button *button) |
