# Patch from Alberto Milone <alberto.milone@canonical.com> to add Linux 3.8 support.

diff -Naur fglrx-driver-13.1.orig/common/lib/modules/fglrx/build_mod/kcl_acpi.c fglrx-driver-13.1/common/lib/modules/fglrx/build_mod/kcl_acpi.c
--- fglrx-driver-13.1.orig/common/lib/modules/fglrx/build_mod/kcl_acpi.c	2013-01-15 16:42:53.000000000 +0100
+++ fglrx-driver-13.1/common/lib/modules/fglrx/build_mod/kcl_acpi.c	2013-01-19 14:22:01.075952886 +0100
@@ -775,7 +775,9 @@
 unsigned int ATI_API_CALL KCL_ACPI_GetHandles(kcl_match_info_t *pInfo)
 {
 #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,12)
-    #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,19)
+    #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0)
+        pInfo->video_handle = pInfo->pcidev->dev.acpi_node.handle;
+    #elif LINUX_VERSION_CODE > KERNEL_VERSION(2,6,19)
         pInfo->video_handle = pInfo->pcidev->dev.archdata.acpi_handle;
     #else 
         pInfo->video_handle = pInfo->pcidev->dev.firmware_data;
