[PATCH][Raring] UBUNTU: SAUCE: samsung-laptop: disable in UEFI mode

Colin King colin.king at canonical.com
Wed Dec 19 22:08:18 UTC 2012


From: Colin Ian King <colin.king at 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 at canonical.com>
---
 drivers/platform/x86/samsung-laptop.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/platform/x86/samsung-laptop.c b/drivers/platform/x86/samsung-laptop.c
index dd90d15..215e5f6 100644
--- a/drivers/platform/x86/samsung-laptop.c
+++ b/drivers/platform/x86/samsung-laptop.c
@@ -27,6 +27,7 @@
 #include <linux/debugfs.h>
 #include <linux/ctype.h>
 #include <acpi/video.h>
+#include <linux/efi.h>
 
 /*
  * This driver is needed because a number of Samsung laptops do not hook
@@ -1534,6 +1535,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;
-- 
1.7.9.5





More information about the kernel-team mailing list