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

regulator: fix tps6524x section mismatch

Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>

Fix section mismatch that is caused by init code calling exit code:
pmic_remove() cannot be marked as __devexit.

WARNING: drivers/regulator/tps6524x-regulator.o(.devinit.text+0x205): Section mismatch in reference from the function pmic_probe() to the function .devexit.text:pmic_remove()
The function __devinit pmic_probe() references
a function __devexit pmic_remove().
This is often seen when error handling in the init function
uses functionality in the exit path.
The fix is often to remove the __devexit annotation of
pmic_remove() so it may be used outside an exit section.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Liam Girdwood <lrg@slimlogic.co.uk>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Cyril Chemparathy <cyril@ti.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>

authored by

Randy Dunlap and committed by
Liam Girdwood
5362b098 69952369

+1 -1
+1 -1
drivers/regulator/tps6524x-regulator.c
··· 596 596 .get_current_limit = get_current_limit, 597 597 }; 598 598 599 - static int __devexit pmic_remove(struct spi_device *spi) 599 + static int pmic_remove(struct spi_device *spi) 600 600 { 601 601 struct tps6524x *hw = spi_get_drvdata(spi); 602 602 int i;