[PATCH] mfd, ab3550: Fix spurious section mismatch warning.
From: Rakib Mullick
Date: Wed Oct 20 2010 - 05:04:30 EST
This patch fixes the following section mismatch warning.
ab3550_driver has been reffered from both __init and __exit path so
use __refdata to keep it calm.
WARNING: drivers/mfd/built-in.o(.data+0x3b4c): Section mismatch in
reference from the variable ab3550_driver to the function
.init.text:ab3550_probe()
The variable ab3550_driver references
the function __init ab3550_probe()
If the reference is valid then annotate the
variable with __init* or __refdata (see linux/init.h) or name the variable:
*_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console,
Signed-off-by: Rakib Mullick <rakib.mullick@xxxxxxxxx>
---
--- linus-rc8/drivers/mfd/ab3550-core.c 2010-10-15 05:26:43.000000000 +0600
+++ rakib-rc8/drivers/mfd/ab3550-core.c 2010-10-20 14:44:58.000000000 +0600
@@ -1373,7 +1373,8 @@ static const struct i2c_device_id ab3550
};
MODULE_DEVICE_TABLE(i2c, ab3550_id);
-static struct i2c_driver ab3550_driver = {
+/* Use __refdata to fix spurious section mismatch warning. */
+static struct i2c_driver ab3550_driver __refdata = {
.driver = {
.name = AB3550_NAME_STRING,
.owner = THIS_MODULE,
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/