--- zzzz-none-000/linux-5.4.213/drivers/base/regmap/Makefile 2022-09-15 10:04:56.000000000 +0000 +++ alder-5690pro-762/linux-5.4.213/drivers/base/regmap/Makefile 2024-08-14 09:01:35.000000000 +0000 @@ -2,10 +2,14 @@ # For include/trace/define_trace.h to include trace.h CFLAGS_regmap.o := -I$(src) -obj-$(CONFIG_REGMAP) += regmap.o regcache.o -obj-$(CONFIG_REGMAP) += regcache-rbtree.o regcache-flat.o -obj-$(CONFIG_REGCACHE_COMPRESSED) += regcache-lzo.o -obj-$(CONFIG_DEBUG_FS) += regmap-debugfs.o +regmap-core-objs = regmap.o regcache.o regcache-rbtree.o regcache-flat.o +ifdef CONFIG_DEBUG_FS +regmap-core-objs += regmap-debugfs.o +endif +ifdef CONFIG_REGCACHE_COMPRESSED +regmap-core-objs += regcache-lzo.o +endif +obj-$(CONFIG_REGMAP) += regmap-core.o obj-$(CONFIG_REGMAP_AC97) += regmap-ac97.o obj-$(CONFIG_REGMAP_I2C) += regmap-i2c.o obj-$(CONFIG_REGMAP_SLIMBUS) += regmap-slimbus.o