Skip to content

Commit d15f1c2

Browse files
committed
ACPI: PNP: Drop CMOS RTC PNP device support
A previous change updated is_cmos_rtc_device() to effectively never allow PNP devices to be created for the CMOS RTC on x86 with ACPI and the PNP bus type is only used on x86, so the CMOS RTC device IDs can be dropped from acpi_pnp_device_ids[] and is_cmos_rtc_device() can go away completely. Update the code accordingly. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Link: https://patch.msgid.link/3411834.aeNJFYEL58@rafael.j.wysocki
1 parent 2a78e42 commit d15f1c2

1 file changed

Lines changed: 1 addition & 21 deletions

File tree

drivers/acpi/acpi_pnp.c

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -125,10 +125,6 @@ static const struct acpi_device_id acpi_pnp_device_ids[] = {
125125
{"PNP0401"}, /* ECP Printer Port */
126126
/* apple-gmux */
127127
{"APP000B"},
128-
/* rtc_cmos */
129-
{"PNP0b00"},
130-
{"PNP0b01"},
131-
{"PNP0b02"},
132128
/* c6xdigio */
133129
{"PNP0400"}, /* Standard LPT Printer Port */
134130
{"PNP0401"}, /* ECP Printer Port */
@@ -355,25 +351,9 @@ static struct acpi_scan_handler acpi_pnp_handler = {
355351
.attach = acpi_pnp_attach,
356352
};
357353

358-
/*
359-
* For CMOS RTC devices, the PNP ACPI scan handler does not work, because
360-
* there is a CMOS RTC ACPI scan handler installed already, so we need to
361-
* check those devices and enumerate them to the PNP bus directly.
362-
*/
363-
static int is_cmos_rtc_device(struct acpi_device *adev)
364-
{
365-
static const struct acpi_device_id ids[] = {
366-
{ "PNP0B00" },
367-
{ "PNP0B01" },
368-
{ "PNP0B02" },
369-
{""},
370-
};
371-
return !cmos_rtc_platform_device_present && !acpi_match_device_ids(adev, ids);
372-
}
373-
374354
bool acpi_is_pnp_device(struct acpi_device *adev)
375355
{
376-
return adev->handler == &acpi_pnp_handler || is_cmos_rtc_device(adev);
356+
return adev->handler == &acpi_pnp_handler;
377357
}
378358
EXPORT_SYMBOL_GPL(acpi_is_pnp_device);
379359

0 commit comments

Comments
 (0)