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

regulator: Rename files for Maxim PMIC drivers

Most Maxim PMIC regulator drivers are for sub-devices of Multi-Function
Devices with drivers under drivers/mfd. But for many of these, the same
object file name was used for both the MFD and the regulator drivers.

Having 2 different drivers with the same name causes a lot of confusion
to Kbuild, specially if these are built as module since only one module
will be installed and also exported symbols will be undefined due being
overwritten by the other module during modpost.

For example, it fixes the following issue when both drivers are module:

$ make M=drivers/regulator/
...
CC [M] drivers/regulator//max14577.o
Building modules, stage 2.
MODPOST 1 modules
WARNING: "maxim_charger_calc_reg_current" [drivers/regulator//max14577.ko] undefined!
WARNING: "maxim_charger_currents" [drivers/regulator//max14577.ko] undefined!

Reported-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Javier Martinez Canillas and committed by
Mark Brown
86cf635a f55532a0

+5 -5
+2 -2
MAINTAINERS
··· 7019 7019 M: Krzysztof Kozlowski <k.kozlowski@samsung.com> 7020 7020 L: linux-kernel@vger.kernel.org 7021 7021 S: Supported 7022 - F: drivers/*/max14577.c 7022 + F: drivers/*/max14577*.c 7023 7023 F: drivers/*/max77686*.c 7024 - F: drivers/*/max77693.c 7024 + F: drivers/*/max77693*.c 7025 7025 F: drivers/extcon/extcon-max14577.c 7026 7026 F: drivers/extcon/extcon-max77693.c 7027 7027 F: drivers/rtc/rtc-max77686.c
+3 -3
drivers/regulator/Makefile
··· 46 46 obj-$(CONFIG_REGULATOR_LP8788) += lp8788-ldo.o 47 47 obj-$(CONFIG_REGULATOR_LP8755) += lp8755.o 48 48 obj-$(CONFIG_REGULATOR_LTC3589) += ltc3589.o 49 - obj-$(CONFIG_REGULATOR_MAX14577) += max14577.o 49 + obj-$(CONFIG_REGULATOR_MAX14577) += max14577-regulator.o 50 50 obj-$(CONFIG_REGULATOR_MAX1586) += max1586.o 51 51 obj-$(CONFIG_REGULATOR_MAX77620) += max77620-regulator.o 52 52 obj-$(CONFIG_REGULATOR_MAX8649) += max8649.o ··· 55 55 obj-$(CONFIG_REGULATOR_MAX8925) += max8925-regulator.o 56 56 obj-$(CONFIG_REGULATOR_MAX8952) += max8952.o 57 57 obj-$(CONFIG_REGULATOR_MAX8973) += max8973-regulator.o 58 - obj-$(CONFIG_REGULATOR_MAX8997) += max8997.o 58 + obj-$(CONFIG_REGULATOR_MAX8997) += max8997-regulator.o 59 59 obj-$(CONFIG_REGULATOR_MAX8998) += max8998.o 60 60 obj-$(CONFIG_REGULATOR_MAX77686) += max77686-regulator.o 61 - obj-$(CONFIG_REGULATOR_MAX77693) += max77693.o 61 + obj-$(CONFIG_REGULATOR_MAX77693) += max77693-regulator.o 62 62 obj-$(CONFIG_REGULATOR_MAX77802) += max77802-regulator.o 63 63 obj-$(CONFIG_REGULATOR_MC13783) += mc13783-regulator.o 64 64 obj-$(CONFIG_REGULATOR_MC13892) += mc13892-regulator.o
drivers/regulator/max14577.c drivers/regulator/max14577-regulator.c
drivers/regulator/max77693.c drivers/regulator/max77693-regulator.c
drivers/regulator/max8997.c drivers/regulator/max8997-regulator.c