diff options
| author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2026-02-23 16:30:21 +0100 |
|---|---|---|
| committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2026-02-26 18:47:52 +0100 |
| commit | 2a78e42104444f948698f1225deaf515e9b7224d (patch) | |
| tree | e0b89a26be6bc0c7e59c59f3353408f032e2453c /drivers/acpi/x86 | |
| parent | 1ae2f435350ec05224a39995c3a680aa6fdae5a5 (diff) | |
| download | lwn-2a78e42104444f948698f1225deaf515e9b7224d.tar.gz lwn-2a78e42104444f948698f1225deaf515e9b7224d.zip | |
ACPI: x86/rtc-cmos: Use platform device for driver binding
Modify the rtc-cmos driver to bind to a platform device on systems with
ACPI via acpi_match_table and advertise the CMOST RTC ACPI device IDs
for driver auto-loading. Note that adding the requisite device IDs to
it and exposing them via MODULE_DEVICE_TABLE() is sufficient for this
purpose.
Since the ACPI device IDs in question are the same as for the CMOS RTC
ACPI scan handler, put them into a common header file and use the
definition from there in both places.
Additionally, to prevent a PNP device from being created for the CMOS
RTC if a platform one is present already, make is_cmos_rtc_device()
check cmos_rtc_platform_device_present introduced previously.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://patch.msgid.link/13969123.uLZWGnKmhe@rafael.j.wysocki
Diffstat (limited to 'drivers/acpi/x86')
| -rw-r--r-- | drivers/acpi/x86/cmos_rtc.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/acpi/x86/cmos_rtc.c b/drivers/acpi/x86/cmos_rtc.c index bdd66dfd4a44..a6df5b991c96 100644 --- a/drivers/acpi/x86/cmos_rtc.c +++ b/drivers/acpi/x86/cmos_rtc.c @@ -18,10 +18,7 @@ #include "../internal.h" static const struct acpi_device_id acpi_cmos_rtc_ids[] = { - { "PNP0B00" }, - { "PNP0B01" }, - { "PNP0B02" }, - {} + ACPI_CMOS_RTC_IDS }; bool cmos_rtc_platform_device_present; |
