Skip to content

Commit 06bc006

Browse files
committed
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
1 parent a2a3659 commit 06bc006

1 file changed

Lines changed: 4 additions & 7 deletions

File tree

drivers/acpi/button.c

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ static int acpi_lid_evaluate_state(acpi_handle lid_handle)
204204
return !!lid_state;
205205
}
206206

207-
static int acpi_lid_notify_state(struct acpi_button *button, bool state)
207+
static void acpi_lid_notify_state(struct acpi_button *button, bool state)
208208
{
209209
struct acpi_device *device = button->adev;
210210
ktime_t next_report;
@@ -282,8 +282,6 @@ static int acpi_lid_notify_state(struct acpi_button *button, bool state)
282282
button->last_state = state;
283283
button->last_time = ktime_get();
284284
}
285-
286-
return 0;
287285
}
288286

289287
static int __maybe_unused acpi_button_state_seq_show(struct seq_file *seq,
@@ -407,19 +405,18 @@ int acpi_lid_open(void)
407405
}
408406
EXPORT_SYMBOL(acpi_lid_open);
409407

410-
static int acpi_lid_update_state(struct acpi_button *button,
411-
bool signal_wakeup)
408+
static void acpi_lid_update_state(struct acpi_button *button, bool signal_wakeup)
412409
{
413410
int state;
414411

415412
state = acpi_lid_evaluate_state(button->adev->handle);
416413
if (state < 0)
417-
return state;
414+
return;
418415

419416
if (state && signal_wakeup)
420417
acpi_pm_wakeup_event(button->dev);
421418

422-
return acpi_lid_notify_state(button, state);
419+
acpi_lid_notify_state(button, state);
423420
}
424421

425422
static void acpi_lid_initialize_state(struct acpi_button *button)

0 commit comments

Comments
 (0)