bool
        select RTC_LIB
 
-config RTC_LIB_KUNIT_TEST
-       tristate "KUnit test for RTC lib functions" if !KUNIT_ALL_TESTS
-       depends on KUNIT
-       default KUNIT_ALL_TESTS
-       select RTC_LIB
-       help
-         Enable this option to test RTC library functions.
-
-         If unsure, say N.
-
 menuconfig RTC_CLASS
        bool "Real Time Clock"
        default n
          Say yes here to enable debugging support in the RTC framework
          and individual RTC drivers.
 
+config RTC_LIB_KUNIT_TEST
+       tristate "KUnit test for RTC lib functions" if !KUNIT_ALL_TESTS
+       depends on KUNIT
+       default KUNIT_ALL_TESTS
+       help
+         Enable this option to test RTC library functions.
+
+         If unsure, say N.
+
 config RTC_NVMEM
        bool "RTC non volatile storage support"
        select NVMEM
 
 rtc-core-$(CONFIG_RTC_INTF_PROC)       += proc.o
 rtc-core-$(CONFIG_RTC_INTF_SYSFS)      += sysfs.o
 
+obj-$(CONFIG_RTC_LIB_KUNIT_TEST)       += lib_test.o
+
 # Keep the list ordered.
 
 obj-$(CONFIG_RTC_DRV_88PM80X)  += rtc-88pm80x.o
 obj-$(CONFIG_RTC_DRV_X1205)    += rtc-x1205.o
 obj-$(CONFIG_RTC_DRV_XGENE)    += rtc-xgene.o
 obj-$(CONFIG_RTC_DRV_ZYNQMP)   += rtc-zynqmp.o
-obj-$(CONFIG_RTC_LIB_KUNIT_TEST)       += lib_test.o