]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
mfd: sec: Merge separate core and irq modules
authorAndré Draszik <andre.draszik@linaro.org>
Wed, 9 Apr 2025 20:37:31 +0000 (21:37 +0100)
committerLee Jones <lee@kernel.org>
Fri, 23 May 2025 07:48:34 +0000 (08:48 +0100)
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 <krzysztof.kozlowski@linaro.org>
Signed-off-by: André Draszik <andre.draszik@linaro.org>
Link: https://lore.kernel.org/r/20250409-s2mpg10-v4-10-d66d5f39b6bf@linaro.org
Signed-off-by: Lee Jones <lee@kernel.org>
drivers/mfd/Makefile
drivers/mfd/sec-common.c [moved from drivers/mfd/sec-core.c with 98% similarity]
drivers/mfd/sec-irq.c

index 6c35be5ade74e967a13dcf81149a1f5b27d0e141..79495f9f3457b8a666646ec9671861c64d7939e1 100644 (file)
@@ -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
similarity index 98%
rename from drivers/mfd/sec-core.c
rename to drivers/mfd/sec-common.c
index c4b7abe511090d8f5ff2eb501f325cc8173b9bf5..782dec1956a5fd7bf0dbb2159f9d222ad3fea942 100644 (file)
@@ -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 <cw00.choi@samsung.com>");
+MODULE_AUTHOR("Krzysztof Kozlowski <krzk@kernel.org>");
 MODULE_AUTHOR("Sangbeom Kim <sbkim73@samsung.com>");
 MODULE_DESCRIPTION("Core driver for the Samsung S5M");
 MODULE_LICENSE("GPL");
index e9beaa2a53fb42120eeb465a7c19acb4af6a0e59..b75d7fe86253037b4b7256a4d8c089003d58bc44 100644 (file)
@@ -6,7 +6,6 @@
 #include <linux/array_size.h>
 #include <linux/build_bug.h>
 #include <linux/dev_printk.h>
-#include <linux/export.h>
 #include <linux/interrupt.h>
 #include <linux/irq.h>
 #include <linux/mfd/samsung/core.h>
@@ -17,7 +16,6 @@
 #include <linux/mfd/samsung/s2mpu02.h>
 #include <linux/mfd/samsung/s2mpu05.h>
 #include <linux/mfd/samsung/s5m8767.h>
-#include <linux/module.h>
 #include <linux/regmap.h>
 #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 <sbkim73@samsung.com>");
-MODULE_AUTHOR("Chanwoo Choi <cw00.choi@samsung.com>");
-MODULE_AUTHOR("Krzysztof Kozlowski <krzk@kernel.org>");
-MODULE_DESCRIPTION("Interrupt support for the S5M MFD");
-MODULE_LICENSE("GPL");