Skip to contentSkip to conversation

regulator: fix tps6524x section mismatch

PATCH Applied Randy Dunlap 3 participants 3 messages Mar 24, 2011 – Mar 26, 2011 Voltage and current regulator framework

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 regulator: fix tps6524x section mismatch

From: Randy Dunlap <[email protected]>

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.

Cc Liam Girdwood <[email protected]>
Cc Mark Brown <[email protected]>
Cc Cyril Chemparathy <[email protected]>
---
 drivers/regulator/tps6524x-regulator.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/regulator/tps6524x-regulator.c +1 -1
@@ -596,7 +596,7 @@ static struct regulator_ops regulator_op
 	.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;
Acked-by on v1 1/1
#1 lore raw
Quoted 6 lines · Randy Dunlap

From: Randy Dunlap <[email protected]>

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()

#2 lore raw
In reply to Randy Dunlap
Quoted 13 lines · Randy Dunlap

From: Randy Dunlap <[email protected]>

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.

Quoted 8 lines
Cc Liam Girdwood <[email protected]>
Cc Mark Brown <[email protected]>
Cc Cyril Chemparathy <[email protected]>
---
 drivers/regulator/tps6524x-regulator.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Applied.
Thanks

Liam