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

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


Message ID 1355954898-15402-2-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 7c42a4c..00ffed9 100644
--- a/drivers/platform/x86/samsung-laptop.c
+++ b/drivers/platform/x86/samsung-laptop.c
@@ -21,6 +21,7 @@ 
 #include <linux/dmi.h>
 #include <linux/platform_device.h>
 #include <linux/rfkill.h>
+#include <linux/efi.h>
  * This driver is needed because a number of Samsung laptops do not hook
@@ -793,6 +794,9 @@  static int __init samsung_init(void)
 	int loca;
 	int retval;
+	if (efi_enabled)
+		return -ENODEV;
 	if (!force && !dmi_check_system(samsung_dmi_table))