1 diff -u -r bbswitch-0.8/bbswitch.c bbswitch-0.8-5.18/bbswitch.c
2 --- bbswitch-0.8/bbswitch.c 2022-05-24 20:26:22.184553495 +0000
3 +++ bbswitch-0.8-5.18/bbswitch.c 2022-05-24 20:29:00.797008130 +0000
5 pci_disable_device(dis_dev);
7 struct acpi_device *ad = NULL;
8 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 18, 0)
9 + ad = acpi_fetch_acpi_dev(dis_handle);
14 r = acpi_bus_get_device(dis_handle, &ad);
17 pr_warn("Cannot get ACPI device for PCI device\n");