Message ID | 1407823822-23829-5-git-send-email-dyoung@redhat.com |
---|---|
State | Superseded |
Headers | show
Return-Path: <rtc-linux+bncBAABBCHAU2PQKGQEJBAMQ2Y@googlegroups.com> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from mail-yh0-x23a.google.com (mail-yh0-x23a.google.com [IPv6:2607:f8b0:4002:c01::23a]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id C4768140096 for <incoming@patchwork.ozlabs.org>; Tue, 12 Aug 2014 16:11:22 +1000 (EST) Received: by mail-yh0-f58.google.com with SMTP id i57sf2052225yha.13 for <incoming@patchwork.ozlabs.org>; Mon, 11 Aug 2014 23:11:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20120806; h=mime-version:from:to:cc:subject:date:message-id:in-reply-to :references:x-original-sender:x-original-authentication-results :reply-to:precedence:mailing-list:list-id:list-post:list-help :list-archive:sender:list-subscribe:list-unsubscribe:content-type; bh=297BxJ8wrTyJE6AV821W3AMUk7takwkeGl+j2+tBGIA=; b=MQkuVVURftfrYdtYjwQxKAdHFPcCcvWzy24nq3dnRUfgZy8ua43Ow1OZGm484dRU2T VokkXk3YYQmTuhc7PyYB0KO6OR5MgpgzwcOAM6Xg96BLr5a2vSRETdR8kiAwB2pZzCA4 OoAmiWew4CxRV3UDGiyhtVRDiYvtoI90Id5tlonGiznYufhFBsMFv+9fYmqKTAX3h9/h 0UXC3trZcI+/36+81Ql0CW5+QcY65F1oIzcunFBhesHNZ15WKsyHA08yZCw2LYd9SLT4 IPRTXUpSnayscY03wDkjdV2X9qKl8kc9/jJDAHY0ValmBoFOdvKiysRYP34ABUGT1QCh 5ePQ== X-Received: by 10.50.39.16 with SMTP id l16mr626357igk.7.1407823880430; Mon, 11 Aug 2014 23:11:20 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: rtc-linux@googlegroups.com Received: by 10.50.97.6 with SMTP id dw6ls205294igb.10.gmail; Mon, 11 Aug 2014 23:11:20 -0700 (PDT) X-Received: by 10.70.40.172 with SMTP id y12mr1480160pdk.8.1407823880135; Mon, 11 Aug 2014 23:11:20 -0700 (PDT) Received: from mx1.redhat.com (mx1.redhat.com. [209.132.183.28]) by gmr-mx.google.com with ESMTPS id hq8si2061925qcb.2.2014.08.11.23.11.19 for <rtc-linux@googlegroups.com> (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 Aug 2014 23:11:20 -0700 (PDT) Received-SPF: pass (google.com: domain of dyoung@redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s7C6BFwI002720 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 12 Aug 2014 02:11:15 -0400 Received: from dhcp-16-198.nay.redhat.com (dhcp-16-104.nay.redhat.com [10.66.16.104]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s7C6AO6c002703; Tue, 12 Aug 2014 02:11:04 -0400 From: Dave Young <dyoung@redhat.com> To: Matt Fleming <matt.fleming@intel.com> Cc: Catalin Marinas <catalin.marinas@arm.com>, Will Deacon <will.deacon@arm.com>, Thomas Gleixner <tglx@linutronix.de>, Ingo Molnar <mingo@redhat.com>, hpa@zytor.com, Alessandro Zummo <a.zummo@towertech.it>, Leif Lindholm <leif.lindholm@linaro.org>, Ard Biesheuvel <ard.biesheuvel@linaro.org>, Mark Salter <msalter@redhat.com>, Randy Dunlap <rdunlap@infradead.org>, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-efi@vger.kernel.org, rtc-linux@googlegroups.com Subject: [rtc-linux] [PATCH 5/5] efi_rtc: probe function error out in case no efi runtime enabled Date: Tue, 12 Aug 2014 14:10:22 +0800 Message-Id: <1407823822-23829-5-git-send-email-dyoung@redhat.com> In-Reply-To: <1407823822-23829-1-git-send-email-dyoung@redhat.com> References: <1407823822-23829-1-git-send-email-dyoung@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 X-Original-Sender: dyoung@redhat.com X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of dyoung@redhat.com designates 209.132.183.28 as permitted sender) smtp.mail=dyoung@redhat.com Reply-To: rtc-linux@googlegroups.com Precedence: list Mailing-list: list rtc-linux@googlegroups.com; contact rtc-linux+owners@googlegroups.com List-ID: <rtc-linux.googlegroups.com> X-Google-Group-Id: 712029733259 List-Post: <http://groups.google.com/group/rtc-linux/post>, <mailto:rtc-linux@googlegroups.com> List-Help: <http://groups.google.com/support/>, <mailto:rtc-linux+help@googlegroups.com> List-Archive: <http://groups.google.com/group/rtc-linux Sender: rtc-linux@googlegroups.com List-Subscribe: <http://groups.google.com/group/rtc-linux/subscribe>, <mailto:rtc-linux+subscribe@googlegroups.com> List-Unsubscribe: <mailto:googlegroups-manage+712029733259+unsubscribe@googlegroups.com>, <http://groups.google.com/group/rtc-linux/subscribe> Content-Type: text/plain; charset=ISO-8859-1 |
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))
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(+)