[PATCH] x86: honor ACPI FADT flag indicating absence of a CMOSRTC
From: Jan Beulich
Date: Wed Oct 16 2013 - 07:37:42 EST
We shouldn't be creating a corresponding platform device in that case.
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
---
arch/x86/kernel/rtc.c | 5 +++++
1 file changed, 5 insertions(+)
--- 3.12-rc5/arch/x86/kernel/rtc.c
+++ 3.12-rc5-x86-ACPI-no-RTC/arch/x86/kernel/rtc.c
@@ -192,6 +192,11 @@ static __init int add_rtc_cmos(void)
if (mrst_identify_cpu())
return -ENODEV;
+#ifdef CONFIG_ACPI
+ if (acpi_gbl_FADT.boot_flags & ACPI_FADT_NO_CMOS_RTC)
+ return -ENODEV;
+#endif
+
platform_device_register(&rtc_device);
dev_info(&rtc_device.dev,
"registered platform RTC device (no PNP device found)\n");
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/