Skip to content

Commit

Permalink
Merge pull request #216 from arighi/arighi
Browse files Browse the repository at this point in the history
check for power state only when ACPI is available
  • Loading branch information
bluca authored Nov 29, 2021
2 parents ddbd243 + 83c72d8 commit 2389117
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions bbswitch.c
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,7 @@ static void bbswitch_off(void) {
pci_save_state(dis_dev);
pci_clear_master(dis_dev);
pci_disable_device(dis_dev);
#ifdef CONFIG_ACPI
do {
struct acpi_device *ad = NULL;
int r;
Expand All @@ -276,6 +277,7 @@ static void bbswitch_off(void) {
ad->power.state = ACPI_STATE_D0;
}
} while (0);
#endif
pci_set_power_state(dis_dev, PCI_D3cold);

if (bbswitch_acpi_off())
Expand Down

0 comments on commit 2389117

Please sign in to comment.