From: Ozan Çağlayan Date: Sun, 28 Oct 2012 17:55:44 +0000 (+0200) Subject: compat-drivers: drm: Revert ACPI table size check for < 3.6 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=50d053efc83f42e694b3b08e751647a708e520af;p=openwrt%2Fstaging%2Fblogic.git compat-drivers: drm: Revert ACPI table size check for < 3.6 acpi_get_table_with_size() was exported with kernels >= 3.6. Revert the size checking for kernels < 3.6. Signed-off-by: Ozan Çağlayan Signed-off-by: Luis R. Rodriguez --- diff --git a/patches/drm/10-radeon-revert-acpi-table-size-check.patch b/patches/drm/10-radeon-revert-acpi-table-size-check.patch new file mode 100644 index 000000000000..d595a989b983 --- /dev/null +++ b/patches/drm/10-radeon-revert-acpi-table-size-check.patch @@ -0,0 +1,29 @@ +acpi_get_table_with_size() was exported with kernels >= 3.6. Revert the +size checking for kernels < 3.6. + +Index: compat-drivers/drivers/gpu/drm/radeon/radeon_bios.c +=================================================================== +--- compat-drivers.orig/drivers/gpu/drm/radeon/radeon_bios.c ++++ compat-drivers/drivers/gpu/drm/radeon/radeon_bios.c +@@ -554,12 +554,21 @@ static bool radeon_acpi_vfct_bios(struct + { + bool ret = false; + struct acpi_table_header *hdr; ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0)) + acpi_size tbl_size; ++#else ++ /* acpi_get_table_with_size() not exported on kernels < 3.6 */ ++ acpi_size tbl_size = 0x7fffffff; ++#endif + UEFI_ACPI_VFCT *vfct; + GOP_VBIOS_CONTENT *vbios; + VFCT_IMAGE_HEADER *vhdr; + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0)) + if (!ACPI_SUCCESS(acpi_get_table_with_size("VFCT", 1, &hdr, &tbl_size))) ++#else ++ if (!ACPI_SUCCESS(acpi_get_table("VFCT", 1, &hdr))) ++#endif + return false; + if (tbl_size < sizeof(UEFI_ACPI_VFCT)) { + DRM_ERROR("ACPI VFCT table present but broken (too short #1)\n");