From: André Draszik Date: Wed, 9 Apr 2025 20:37:31 +0000 (+0100) Subject: mfd: sec: Merge separate core and irq modules X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=b355f0cb92bd5e48d850e32960ac18fb1394cf8e;p=users%2Fjedix%2Flinux-maple.git mfd: sec: Merge separate core and irq modules There is no reason to have these two kernel modules separate. Having them merged into one kernel module also slightly reduces memory consumption and module load times a little. mapped size (lsmod): before: after: sec_core 20480 sec_core 24576 sec_irq 16384 ---------------- total 36864 Section sizes (size -A): before: after: sec_core 6780 sec_core 13239 sec_irq 8046 ---------------- Total 14826 Reviewed-by: Krzysztof Kozlowski Signed-off-by: André Draszik Link: https://lore.kernel.org/r/20250409-s2mpg10-v4-10-d66d5f39b6bf@linaro.org Signed-off-by: Lee Jones --- diff --git a/drivers/mfd/Makefile b/drivers/mfd/Makefile index 6c35be5ade74..79495f9f3457 100644 --- a/drivers/mfd/Makefile +++ b/drivers/mfd/Makefile @@ -229,7 +229,8 @@ obj-$(CONFIG_MFD_RK8XX) += rk8xx-core.o obj-$(CONFIG_MFD_RK8XX_I2C) += rk8xx-i2c.o obj-$(CONFIG_MFD_RK8XX_SPI) += rk8xx-spi.o obj-$(CONFIG_MFD_RN5T618) += rn5t618.o -obj-$(CONFIG_MFD_SEC_CORE) += sec-core.o sec-irq.o +sec-core-objs := sec-common.o sec-irq.o +obj-$(CONFIG_MFD_SEC_CORE) += sec-core.o obj-$(CONFIG_MFD_SEC_ACPM) += sec-acpm.o obj-$(CONFIG_MFD_SEC_I2C) += sec-i2c.o obj-$(CONFIG_MFD_SYSCON) += syscon.o diff --git a/drivers/mfd/sec-core.c b/drivers/mfd/sec-common.c similarity index 98% rename from drivers/mfd/sec-core.c rename to drivers/mfd/sec-common.c index c4b7abe51109..782dec1956a5 100644 --- a/drivers/mfd/sec-core.c +++ b/drivers/mfd/sec-common.c @@ -307,6 +307,8 @@ static int sec_pmic_resume(struct device *dev) DEFINE_SIMPLE_DEV_PM_OPS(sec_pmic_pm_ops, sec_pmic_suspend, sec_pmic_resume); EXPORT_SYMBOL_GPL(sec_pmic_pm_ops); +MODULE_AUTHOR("Chanwoo Choi "); +MODULE_AUTHOR("Krzysztof Kozlowski "); MODULE_AUTHOR("Sangbeom Kim "); MODULE_DESCRIPTION("Core driver for the Samsung S5M"); MODULE_LICENSE("GPL"); diff --git a/drivers/mfd/sec-irq.c b/drivers/mfd/sec-irq.c index e9beaa2a53fb..b75d7fe86253 100644 --- a/drivers/mfd/sec-irq.c +++ b/drivers/mfd/sec-irq.c @@ -6,7 +6,6 @@ #include #include #include -#include #include #include #include @@ -17,7 +16,6 @@ #include #include #include -#include #include #include "sec-core.h" @@ -510,10 +508,3 @@ int sec_irq_init(struct sec_pmic_dev *sec_pmic) return 0; } -EXPORT_SYMBOL_GPL(sec_irq_init); - -MODULE_AUTHOR("Sangbeom Kim "); -MODULE_AUTHOR("Chanwoo Choi "); -MODULE_AUTHOR("Krzysztof Kozlowski "); -MODULE_DESCRIPTION("Interrupt support for the S5M MFD"); -MODULE_LICENSE("GPL");