From 5362b09849508db94a15f3f6996427aab248320a Mon Sep 17 00:00:00 2001 From: Randy Dunlap Date: Thu, 24 Mar 2011 13:30:59 -0700 Subject: [PATCH] regulator: fix tps6524x section mismatch Acked-by: Mark Brown 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 Cc: Liam Girdwood Cc: Mark Brown Cc: Cyril Chemparathy Signed-off-by: Liam Girdwood --- drivers/regulator/tps6524x-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/regulator/tps6524x-regulator.c b/drivers/regulator/tps6524x-regulator.c index 176a6be5a8ce..9166aa0a9df7 100644 --- a/drivers/regulator/tps6524x-regulator.c +++ b/drivers/regulator/tps6524x-regulator.c @@ -596,7 +596,7 @@ static struct regulator_ops regulator_ops = { .get_current_limit = get_current_limit, }; -static int __devexit pmic_remove(struct spi_device *spi) +static int pmic_remove(struct spi_device *spi) { struct tps6524x *hw = spi_get_drvdata(spi); int i; -- 2.20.1