From patchwork Tue Oct 2 09:34:34 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [1/2,v3] efi_runtime: add checking the efi environment X-Patchwork-Submitter: ivanhu X-Patchwork-Id: 188435 Message-Id: <1349170474-18736-1-git-send-email-ivan.hu@canonical.com> To: fwts-devel@lists.ubuntu.com Date: Tue, 2 Oct 2012 17:34:34 +0800 From: Ivan Hu List-Id: Firmware Test Suite Development This driver should be worked on efi environment, so efi_runtime_init will check efi_enable to register the driver. Signed-off-by: Ivan Hu Acked-by: Colin Ian King Acked-by: Keng-Yu Lin --- efi_runtime/efi_runtime.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/efi_runtime/efi_runtime.c b/efi_runtime/efi_runtime.c index 7d99fbc..ccf4eff 100644 --- a/efi_runtime/efi_runtime.c +++ b/efi_runtime/efi_runtime.c @@ -304,6 +304,9 @@ static int __init efi_runtime_init(void) printk(KERN_INFO "EFI_RUNTIME Driver v%s\n", EFI_FWTS_EFI_VERSION); + if (!efi_enabled) + return -ENODEV; + ret = misc_register(&efi_runtime_dev); if (ret) { printk(KERN_ERR "efi_runtime: can't misc_register on minor=%d\n",