From 251a7fbec40a3d78c5bdb37fc699be6ae340746b Mon Sep 17 00:00:00 2001 From: Peter Wu Date: Thu, 5 Dec 2013 00:16:18 +0100 Subject: [PATCH] acpi-handle-hack: Linux 3.13 compatibility Just in case this hack is needed in the future. --- acpi-handle-hack.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/acpi-handle-hack.c b/acpi-handle-hack.c index af5f3cf..74ae46e 100644 --- a/acpi-handle-hack.c +++ b/acpi-handle-hack.c @@ -81,7 +81,14 @@ static int __init hack_apply(void) { pr_err("No discrete video card found\n"); return -ENODEV; } + +#ifdef ACPI_HANDLE + /* since Linux 3.8 */ + orig_handle = ACPI_HANDLE(&dis_dev->dev); +#else + /* removed since Linux 3.13 */ orig_handle = DEVICE_ACPI_HANDLE(&dis_dev->dev); +#endif if (!orig_handle) { pr_err("No ACPI handle found for discrete video card\n"); goto free_dev;