From 18c3892778f421fb60829dc768a0816b7192386c Mon Sep 17 00:00:00 2001 From: Peter Wu Date: Mon, 2 Sep 2013 15:00:39 +0200 Subject: [PATCH] acpi-handle-hack: compatibility with Linux 3.8+ --- acpi-handle-hack.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/acpi-handle-hack.c b/acpi-handle-hack.c index d573049..7e6ee20 100644 --- a/acpi-handle-hack.c +++ b/acpi-handle-hack.c @@ -60,7 +60,12 @@ static struct pci_dev __init *get_discrete_device(void) { * Very ugly hack to set the ACPI handle, do not use this as exemplary code! */ static void dev_set_acpi_handle(struct pci_dev *pdev, acpi_handle handle) { +#ifdef ACPI_HANDLE_SET + ACPI_HANDLE_SET(&pdev->dev, handle); +#else + /* for Linux 3.7 and earlier */ pdev->dev.archdata.acpi_handle = handle; +#endif } static int __init hack_apply(void) {