Skip to content

Commit b355f0c

Browse files
andredlag-linaro
authored andcommitted
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 <[email protected]> Signed-off-by: André Draszik <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Lee Jones <[email protected]>
1 parent 5338709 commit b355f0c

File tree

3 files changed

+4
-10
lines changed

3 files changed

+4
-10
lines changed

drivers/mfd/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,8 @@ obj-$(CONFIG_MFD_RK8XX) += rk8xx-core.o
229229
obj-$(CONFIG_MFD_RK8XX_I2C) += rk8xx-i2c.o
230230
obj-$(CONFIG_MFD_RK8XX_SPI) += rk8xx-spi.o
231231
obj-$(CONFIG_MFD_RN5T618) += rn5t618.o
232-
obj-$(CONFIG_MFD_SEC_CORE) += sec-core.o sec-irq.o
232+
sec-core-objs := sec-common.o sec-irq.o
233+
obj-$(CONFIG_MFD_SEC_CORE) += sec-core.o
233234
obj-$(CONFIG_MFD_SEC_ACPM) += sec-acpm.o
234235
obj-$(CONFIG_MFD_SEC_I2C) += sec-i2c.o
235236
obj-$(CONFIG_MFD_SYSCON) += syscon.o

drivers/mfd/sec-core.c renamed to drivers/mfd/sec-common.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,8 @@ static int sec_pmic_resume(struct device *dev)
307307
DEFINE_SIMPLE_DEV_PM_OPS(sec_pmic_pm_ops, sec_pmic_suspend, sec_pmic_resume);
308308
EXPORT_SYMBOL_GPL(sec_pmic_pm_ops);
309309

310+
MODULE_AUTHOR("Chanwoo Choi <[email protected]>");
311+
MODULE_AUTHOR("Krzysztof Kozlowski <[email protected]>");
310312
MODULE_AUTHOR("Sangbeom Kim <[email protected]>");
311313
MODULE_DESCRIPTION("Core driver for the Samsung S5M");
312314
MODULE_LICENSE("GPL");

drivers/mfd/sec-irq.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
#include <linux/array_size.h>
77
#include <linux/build_bug.h>
88
#include <linux/dev_printk.h>
9-
#include <linux/export.h>
109
#include <linux/interrupt.h>
1110
#include <linux/irq.h>
1211
#include <linux/mfd/samsung/core.h>
@@ -17,7 +16,6 @@
1716
#include <linux/mfd/samsung/s2mpu02.h>
1817
#include <linux/mfd/samsung/s2mpu05.h>
1918
#include <linux/mfd/samsung/s5m8767.h>
20-
#include <linux/module.h>
2119
#include <linux/regmap.h>
2220
#include "sec-core.h"
2321

@@ -510,10 +508,3 @@ int sec_irq_init(struct sec_pmic_dev *sec_pmic)
510508

511509
return 0;
512510
}
513-
EXPORT_SYMBOL_GPL(sec_irq_init);
514-
515-
MODULE_AUTHOR("Sangbeom Kim <[email protected]>");
516-
MODULE_AUTHOR("Chanwoo Choi <[email protected]>");
517-
MODULE_AUTHOR("Krzysztof Kozlowski <[email protected]>");
518-
MODULE_DESCRIPTION("Interrupt support for the S5M MFD");
519-
MODULE_LICENSE("GPL");

0 commit comments

Comments
 (0)