lkml.org 
[lkml]   [2014]   [Aug]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH 2/2] efi_rtc: probe function error out in case no efi runtime enabled

efi rtc depends on efi runtime services, so if efi runtime services are not
usable it should error out.

Without this patch rtc-efi will panic with 'noefi' boot

Signed-off-by: Dave Young <dyoung@redhat.com>
---
drivers/rtc/rtc-efi.c | 3 +++
1 file changed, 3 insertions(+)

Index: linux-2.6/drivers/rtc/rtc-efi.c
===================================================================
--- linux-2.6.orig/drivers/rtc/rtc-efi.c
+++ linux-2.6/drivers/rtc/rtc-efi.c
@@ -191,6 +191,9 @@ static int __init efi_rtc_probe(struct p
{
struct rtc_device *rtc;

+ if (!efi_enabled(EFI_RUNTIME_SERVICES))
+ return -ENODEV;
+
rtc = devm_rtc_device_register(&dev->dev, "rtc-efi", &efi_rtc_ops,
THIS_MODULE);
if (IS_ERR(rtc))

\
 
 \ /
  Last update: 2014-08-06 11:01    [W:0.022 / U:0.144 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site