Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mfd: rsmu: Split core code into separate module

Linking a file into two modules can have unintended side-effects
and produces a W=1 warning:

scripts/Makefile.build:236: drivers/mfd/Makefile: rsmu_core.o is added to multiple modules: rsmu-i2c rsmu-spi

Make this one a separate module instead.

Fixes: a1867f85e06e ("mfd: Add Renesas Synchronization Management Unit (SMU) support")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20240529094856.1869543-1-arnd@kernel.org
Signed-off-by: Lee Jones <lee@kernel.org>

authored by

Arnd Bergmann and committed by
Lee Jones
c879a8c3 6ca6a63e

+4 -4
+2 -4
drivers/mfd/Makefile
··· 286 286 obj-$(CONFIG_MFD_ATC260X) += atc260x-core.o 287 287 obj-$(CONFIG_MFD_ATC260X_I2C) += atc260x-i2c.o 288 288 289 - rsmu-i2c-objs := rsmu_core.o rsmu_i2c.o 290 - rsmu-spi-objs := rsmu_core.o rsmu_spi.o 291 - obj-$(CONFIG_MFD_RSMU_I2C) += rsmu-i2c.o 292 - obj-$(CONFIG_MFD_RSMU_SPI) += rsmu-spi.o 289 + obj-$(CONFIG_MFD_RSMU_I2C) += rsmu_i2c.o rsmu_core.o 290 + obj-$(CONFIG_MFD_RSMU_SPI) += rsmu_spi.o rsmu_core.o
+2
drivers/mfd/rsmu_core.c
··· 78 78 79 79 return ret; 80 80 } 81 + EXPORT_SYMBOL_GPL(rsmu_core_init); 81 82 82 83 void rsmu_core_exit(struct rsmu_ddata *rsmu) 83 84 { 84 85 mutex_destroy(&rsmu->lock); 85 86 } 87 + EXPORT_SYMBOL_GPL(rsmu_core_exit); 86 88 87 89 MODULE_DESCRIPTION("Renesas SMU core driver"); 88 90 MODULE_LICENSE("GPL");