浏览代码

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>
Shawn Guo 13 年之前
父节点
当前提交
c0d78c2342
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 3 3
      drivers/regulator/anatop-regulator.c

+ 3 - 3
drivers/regulator/anatop-regulator.c

@@ -213,7 +213,7 @@ static struct of_device_id __devinitdata of_anatop_regulator_match_tbl[] = {
 	{ /* end */ }
 	{ /* end */ }
 };
 };
 
 
-static struct platform_driver anatop_regulator = {
+static struct platform_driver anatop_regulator_driver = {
 	.driver = {
 	.driver = {
 		.name	= "anatop_regulator",
 		.name	= "anatop_regulator",
 		.owner  = THIS_MODULE,
 		.owner  = THIS_MODULE,
@@ -225,13 +225,13 @@ static struct platform_driver anatop_regulator = {
 
 
 static int __init anatop_regulator_init(void)
 static int __init anatop_regulator_init(void)
 {
 {
-	return platform_driver_register(&anatop_regulator);
+	return platform_driver_register(&anatop_regulator_driver);
 }
 }
 postcore_initcall(anatop_regulator_init);
 postcore_initcall(anatop_regulator_init);
 
 
 static void __exit anatop_regulator_exit(void)
 static void __exit anatop_regulator_exit(void)
 {
 {
-	platform_driver_unregister(&anatop_regulator);
+	platform_driver_unregister(&anatop_regulator_driver);
 }
 }
 module_exit(anatop_regulator_exit);
 module_exit(anatop_regulator_exit);