From patchwork Fri Sep 28 09:46:19 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ivan Hu X-Patchwork-Id: 187749 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from chlorine.canonical.com (chlorine.canonical.com [91.189.94.204]) by ozlabs.org (Postfix) with ESMTP id E6EAE2C00A3 for ; Fri, 28 Sep 2012 19:46:29 +1000 (EST) Received: from localhost ([127.0.0.1] helo=chlorine.canonical.com) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1THX6m-0001Fh-E8; Fri, 28 Sep 2012 09:43:44 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1THX6j-0001FU-Hf for fwts-devel@lists.ubuntu.com; Fri, 28 Sep 2012 09:43:41 +0000 Received: from [175.41.48.77] (helo=canonical.com) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1THX9M-0001sn-4R; Fri, 28 Sep 2012 09:46:24 +0000 From: Ivan Hu To: fwts-devel@lists.ubuntu.com Subject: [RESEND][PATCH 1/2] efi_runtime: add checking the efi enviroment Date: Fri, 28 Sep 2012 17:46:19 +0800 Message-Id: <1348825579-6066-1-git-send-email-ivan.hu@canonical.com> X-Mailer: git-send-email 1.7.9.5 X-BeenThere: fwts-devel@lists.ubuntu.com X-Mailman-Version: 2.1.13 Precedence: list List-Id: Firmware Test Suite Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: fwts-devel-bounces@lists.ubuntu.com Errors-To: fwts-devel-bounces@lists.ubuntu.com This driver should be worked on efi enviroment, so efi_runtime_init will check efi_enable to register the driver. Signed-off-by: Ivan Hu 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",