[Quantal,SRU] UBUNTU: SAUCE: samsung-laptop: disable in UEFI mode

Submitted by Colin King on Dec. 19, 2012, 10:08 p.m.

Details

Message ID 1355954898-15402-4-git-send-email-colin.king@canonical.com
State New
Headers show

Commit Message

Colin King Dec. 19, 2012, 10:08 p.m.
From: Colin Ian King <colin.king@canonical.com>

BugLink: https://launchpad.net/bugs/1040557

Disable this driver if we've booted in UEFI mode as some Samsungs
seem to get bricked and are rendered unbootable when this driver
tries to poke around the BIOS controls when in UEFI.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/platform/x86/samsung-laptop.c |    4 ++++
 1 file changed, 4 insertions(+)

Patch hide | download patch | download mbox

diff --git a/drivers/platform/x86/samsung-laptop.c b/drivers/platform/x86/samsung-laptop.c
index e2a34b4..bec0faf 100644
--- a/drivers/platform/x86/samsung-laptop.c
+++ b/drivers/platform/x86/samsung-laptop.c
@@ -29,6 +29,7 @@ 
 #if (defined CONFIG_ACPI_VIDEO || defined CONFIG_ACPI_VIDEO_MODULE)
 #include <acpi/video.h>
 #endif
+#include <linux/efi.h>
 
 /*
  * This driver is needed because a number of Samsung laptops do not hook
@@ -1517,6 +1518,9 @@  static int __init samsung_init(void)
 	struct samsung_laptop *samsung;
 	int ret;
 
+	if (efi_enabled)
+		return -ENODEV;
+
 	quirks = &samsung_unknown;
 	if (!force && !dmi_check_system(samsung_dmi_table))
 		return -ENODEV;