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

login
register
mail settings
Submitter Colin King
Date Dec. 19, 2012, 10:08 p.m.
Message ID <1355954898-15402-3-git-send-email-colin.king@canonical.com>
Download mbox | patch
Permalink /patch/207530/
State New
Headers show

Comments

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

Patch

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;
+
 	mutex_init(&sabi_mutex);
 	handle_backlight = true;