[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1407823822-23829-5-git-send-email-dyoung@redhat.com>
Date: Tue, 12 Aug 2014 14:10:22 +0800
From: Dave Young <dyoung@...hat.com>
To: Matt Fleming <matt.fleming@...el.com>
Cc: Catalin Marinas <catalin.marinas@....com>,
Will Deacon <will.deacon@....com>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, hpa@...or.com,
Alessandro Zummo <a.zummo@...ertech.it>,
Leif Lindholm <leif.lindholm@...aro.org>,
Ard Biesheuvel <ard.biesheuvel@...aro.org>,
Mark Salter <msalter@...hat.com>,
Randy Dunlap <rdunlap@...radead.org>,
linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-efi@...r.kernel.org, rtc-linux@...glegroups.com
Subject: [PATCH 5/5] 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@...hat.com>
---
drivers/rtc/rtc-efi.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/rtc/rtc-efi.c b/drivers/rtc/rtc-efi.c
index 8225b89..8c02ed8 100644
--- a/drivers/rtc/rtc-efi.c
+++ b/drivers/rtc/rtc-efi.c
@@ -213,6 +213,9 @@ static int __init efi_rtc_probe(struct platform_device *dev)
{
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))
--
1.8.3.1
--
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