Skip to content

Commit 0139085

Browse files
committed
x86: rtc: Drop PNP device check
Previous changes effectively prevented PNP devices from being created for the CMOS RTC on x86 with ACPI. Although in principle a CMOS RTC PNP device may exist on an x86 system without ACPI (that is, an x86 system where there is no ACPI at all, not one booted with ACPI disabled), such systems were there in the field ~30 years ago and most likely they would not be able to run a contemporary Linux kernel. For the above reasons, drop the PNP device check from add_rtc_cmos(). Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Acked-by: Dave Hansen <dave.hansen@linux.intel.com> # x86 Link: https://patch.msgid.link/8660687.T7Z3S40VBb@rafael.j.wysocki
1 parent d15f1c2 commit 0139085

1 file changed

Lines changed: 1 addition & 16 deletions

File tree

arch/x86/kernel/rtc.c

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
#include <linux/platform_device.h>
77
#include <linux/mc146818rtc.h>
88
#include <linux/export.h>
9-
#include <linux/pnp.h>
109

1110
#include <asm/vsyscall.h>
1211
#include <asm/x86_init.h>
@@ -134,28 +133,14 @@ static struct platform_device rtc_device = {
134133

135134
static __init int add_rtc_cmos(void)
136135
{
137-
#ifdef CONFIG_PNP
138-
static const char * const ids[] __initconst =
139-
{ "PNP0b00", "PNP0b01", "PNP0b02", };
140-
struct pnp_dev *dev;
141-
int i;
142-
143-
pnp_for_each_dev(dev) {
144-
for (i = 0; i < ARRAY_SIZE(ids); i++) {
145-
if (compare_pnp_id(dev->id, ids[i]) != 0)
146-
return 0;
147-
}
148-
}
149-
#endif
150136
if (cmos_rtc_platform_device_present)
151137
return 0;
152138

153139
if (!x86_platform.legacy.rtc)
154140
return -ENODEV;
155141

156142
platform_device_register(&rtc_device);
157-
dev_info(&rtc_device.dev,
158-
"registered platform RTC device (no PNP device found)\n");
143+
dev_info(&rtc_device.dev, "registered fallback platform RTC device\n");
159144

160145
return 0;
161146
}

0 commit comments

Comments
 (0)