diff options
author | Ard Biesheuvel <ardb@kernel.org> | 2020-01-23 11:14:09 +0300 |
---|---|---|
committer | Ard Biesheuvel <ardb@kernel.org> | 2020-02-23 23:59:42 +0300 |
commit | e5c3b1cc99451d97ed3b94aff09817c66c040399 (patch) | |
tree | 0e283eb68071bfcdb8f23f46cee9585126765707 /drivers/firmware/efi/efi.c | |
parent | bf67fad19e493bd3f7267b35b97b860280f87acc (diff) | |
download | linux-e5c3b1cc99451d97ed3b94aff09817c66c040399.tar.xz |
efi: Register EFI rtc platform device only when available
Drop the separate driver that registers the EFI rtc on all EFI
systems that have runtime services available, and instead, move
the registration into the core EFI code, and make it conditional
on whether the actual time related services are available.
Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Diffstat (limited to 'drivers/firmware/efi/efi.c')
-rw-r--r-- | drivers/firmware/efi/efi.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/firmware/efi/efi.c b/drivers/firmware/efi/efi.c index abf4c02e0201..69a585106d30 100644 --- a/drivers/firmware/efi/efi.c +++ b/drivers/firmware/efi/efi.c @@ -321,6 +321,9 @@ static int __init efisubsys_init(void) } } + if (efi_rt_services_supported(EFI_RT_SUPPORTED_TIME_SERVICES)) + platform_device_register_simple("rtc-efi", 0, NULL, 0); + /* We register the efi directory at /sys/firmware/efi */ efi_kobj = kobject_create_and_add("efi", firmware_kobj); if (!efi_kobj) { |