[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <280fb52bda85af452e129fa5633598954801871c.1446475492.git.geliangtang@163.com>
Date: Mon, 2 Nov 2015 22:49:01 +0800
From: Geliang Tang <geliangtang@....com>
To: Arnd Bergmann <arnd@...db.de>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: Geliang Tang <geliangtang@....com>, linux-kernel@...r.kernel.org
Subject: [PATCH 2/2] efirtc: add efi_enabled check in efi_rtc_init
Add efi_enabled check in efi_rtc_init() to make sure that efi is enabled.
Signed-off-by: Geliang Tang <geliangtang@....com>
---
drivers/char/efirtc.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/char/efirtc.c b/drivers/char/efirtc.c
index 5323d8c..80058bd 100644
--- a/drivers/char/efirtc.c
+++ b/drivers/char/efirtc.c
@@ -378,6 +378,9 @@ efi_rtc_init(void)
int ret;
struct proc_dir_entry *dir;
+ if (!efi_enabled(EFI_RUNTIME_SERVICES))
+ return 0;
+
printk(KERN_INFO "EFI Time Services Driver v%s\n", EFI_RTC_VERSION);
ret = misc_register(&efi_rtc_dev);
--
2.4.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists