aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/regulator/anatop-regulator.c
diff options
context:
space:
mode:
authorShawn Guo <shawn.guo@linaro.org>2012-04-02 02:57:01 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-04-02 18:28:58 -0400
commitc0d78c23423ee6ec774ac53f129e61839dde1908 (patch)
tree0f9abd1f8472dd85268a4a704c022a6903c8bbfe /drivers/regulator/anatop-regulator.c
parentdd775ae2549217d3ae09363e3edb305d0fa19928 (diff)
regulator: anatop: fix 'anatop_regulator' name collision
There is a name collision between 'struct platform_driver anatop_regulator' and 'struct anatop_regulator', which causes some section mismatch warnings like below. WARNING: vmlinux.o(.data+0x154d4): Section mismatch in reference from the variable anatop_regulator to the function .devinit.text:anatop_regulator_probe() The variable anatop_regulator references the function __devinit anatop_regulator_probe() If the reference is valid then annotate the variable with __init* or __refdata (see linux/init.h) or name the variable: *driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console Rename 'struct platform_driver anatop_regulator' to 'struct platform_driver anatop_regulator_driver' to fix the warnings. Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Cc: Ying-Chun Liu (PaulLiu) <paul.liu@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'drivers/regulator/anatop-regulator.c')
-rw-r--r--drivers/regulator/anatop-regulator.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/regulator/anatop-regulator.c b/drivers/regulator/anatop-regulator.c
index 17499a55113d..e365d11aeb13 100644
--- a/drivers/regulator/anatop-regulator.c
+++ b/drivers/regulator/anatop-regulator.c
@@ -213,7 +213,7 @@ static struct of_device_id __devinitdata of_anatop_regulator_match_tbl[] = {
213 { /* end */ } 213 { /* end */ }
214}; 214};
215 215
216static struct platform_driver anatop_regulator = { 216static struct platform_driver anatop_regulator_driver = {
217 .driver = { 217 .driver = {
218 .name = "anatop_regulator", 218 .name = "anatop_regulator",
219 .owner = THIS_MODULE, 219 .owner = THIS_MODULE,
@@ -225,13 +225,13 @@ static struct platform_driver anatop_regulator = {
225 225
226static int __init anatop_regulator_init(void) 226static int __init anatop_regulator_init(void)
227{ 227{
228 return platform_driver_register(&anatop_regulator); 228 return platform_driver_register(&anatop_regulator_driver);
229} 229}
230postcore_initcall(anatop_regulator_init); 230postcore_initcall(anatop_regulator_init);
231 231
232static void __exit anatop_regulator_exit(void) 232static void __exit anatop_regulator_exit(void)
233{ 233{
234 platform_driver_unregister(&anatop_regulator); 234 platform_driver_unregister(&anatop_regulator_driver);
235} 235}
236module_exit(anatop_regulator_exit); 236module_exit(anatop_regulator_exit);
237 237