Skip to content

Commit

Permalink
mfd: rsmu: Split core code into separate module
Browse files Browse the repository at this point in the history
[ Upstream commit c879a8c ]

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: a1867f8 ("mfd: Add Renesas Synchronization Management Unit (SMU) support")
Signed-off-by: Arnd Bergmann <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Lee Jones <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
  • Loading branch information
arndb authored and gregkh committed Aug 3, 2024
1 parent 35f45d1 commit abf9d5c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 2 additions & 4 deletions drivers/mfd/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,5 @@ obj-$(CONFIG_MFD_INTEL_M10_BMC_PMCI) += intel-m10-bmc-pmci.o
obj-$(CONFIG_MFD_ATC260X) += atc260x-core.o
obj-$(CONFIG_MFD_ATC260X_I2C) += atc260x-i2c.o

rsmu-i2c-objs := rsmu_core.o rsmu_i2c.o
rsmu-spi-objs := rsmu_core.o rsmu_spi.o
obj-$(CONFIG_MFD_RSMU_I2C) += rsmu-i2c.o
obj-$(CONFIG_MFD_RSMU_SPI) += rsmu-spi.o
obj-$(CONFIG_MFD_RSMU_I2C) += rsmu_i2c.o rsmu_core.o
obj-$(CONFIG_MFD_RSMU_SPI) += rsmu_spi.o rsmu_core.o
2 changes: 2 additions & 0 deletions drivers/mfd/rsmu_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,13 @@ int rsmu_core_init(struct rsmu_ddata *rsmu)

return ret;
}
EXPORT_SYMBOL_GPL(rsmu_core_init);

void rsmu_core_exit(struct rsmu_ddata *rsmu)
{
mutex_destroy(&rsmu->lock);
}
EXPORT_SYMBOL_GPL(rsmu_core_exit);

MODULE_DESCRIPTION("Renesas SMU core driver");
MODULE_LICENSE("GPL");

0 comments on commit abf9d5c

Please sign in to comment.