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

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

Commit Message

Colin Ian 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 files changed, 4 insertions(+), 0 deletions(-)


diff --git a/drivers/platform/x86/samsung-laptop.c b/drivers/platform/x86/samsung-laptop.c
index 1782cea..2b6560c 100644
--- a/drivers/platform/x86/samsung-laptop.c
+++ b/drivers/platform/x86/samsung-laptop.c
@@ -22,6 +22,7 @@ 
 #include <linux/platform_device.h>
 #include <linux/rfkill.h>
 #include <linux/acpi.h>
+#include <linux/efi.h>
  * This driver is needed because a number of Samsung laptops do not hook
@@ -824,6 +825,9 @@  static int __init samsung_init(void)
 	int loca;
 	int retval;
+	if (efi_enabled)
+		return -ENODEV;
 	handle_backlight = true;