From patchwork Wed Aug 3 08:57:36 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Wanlong Gao X-Patchwork-Id: 1030792 Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p738xCvU014406 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 3 Aug 2011 08:59:33 GMT Received: from canuck.infradead.org ([2001:4978:20e::1]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QoXI3-000165-Jt; Wed, 03 Aug 2011 08:58:59 +0000 Received: from localhost ([127.0.0.1] helo=canuck.infradead.org) by canuck.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1QoXI3-0005kR-4B; Wed, 03 Aug 2011 08:58:59 +0000 Received: from [222.73.24.84] (helo=song.cn.fujitsu.com) by canuck.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1QoXHz-0005k7-4q for linux-arm-kernel@lists.infradead.org; Wed, 03 Aug 2011 08:58:56 +0000 Received: from tang.cn.fujitsu.com (tang.cn.fujitsu.com [10.167.250.3]) by song.cn.fujitsu.com (Postfix) with ESMTP id 2AA95170044; Wed, 3 Aug 2011 16:58:46 +0800 (CST) Received: from mailserver.fnst.cn.fujitsu.com (tang.cn.fujitsu.com [127.0.0.1]) by tang.cn.fujitsu.com (8.14.3/8.13.1) with ESMTP id p738wjJ2006189; Wed, 3 Aug 2011 16:58:45 +0800 Received: from gaowanlong.fnst.cn.fujitsu.com ([10.167.225.68]) by mailserver.fnst.cn.fujitsu.com (Lotus Domino Release 8.5.1FP4) with ESMTP id 2011080316574676-35899 ; Wed, 3 Aug 2011 16:57:46 +0800 From: Wanlong Gao To: u.kleine-koenig@pengutronix.de Subject: [PATCH v2] mfd:fix section mismatch warning in ab3550-core Date: Wed, 3 Aug 2011 16:57:36 +0800 Message-Id: <1312361856-26127-1-git-send-email-gaowanlong@cn.fujitsu.com> X-Mailer: git-send-email 1.7.6 In-Reply-To: <20110803083255.GJ9250@pengutronix.de> References: <20110803083255.GJ9250@pengutronix.de> X-MIMETrack: Itemize by SMTP Server on mailserver/fnst(Release 8.5.1FP4|July 25, 2010) at 2011-08-03 16:57:46, Serialize by Router on mailserver/fnst(Release 8.5.1FP4|July 25, 2010) at 2011-08-03 16:57:47, Serialize complete at 2011-08-03 16:57:47 X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110803_045855_427056_84DC2588 X-CRM114-Status: GOOD ( 13.69 ) X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.3.1 on canuck.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- Cc: linus.walleij@stericsson.com, srinidhi.kasagar@stericsson.com, linux-arm-kernel@lists.infradead.org, Wanlong Gao , sameo@linux.intel.com X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Wed, 03 Aug 2011 08:59:33 +0000 (UTC) WARNING: drivers/mfd/built-in.o(.data+0x9998): 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: Wanlong Gao Acked-by: Linus Walleij Acked-by: Uwe Kleine-König --- drivers/mfd/ab3550-core.c | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/mfd/ab3550-core.c b/drivers/mfd/ab3550-core.c index 56ba194..882ea71 100644 --- a/drivers/mfd/ab3550-core.c +++ b/drivers/mfd/ab3550-core.c @@ -1086,7 +1086,7 @@ static inline void ab3550_remove_debugfs(void) * This sets up a default config in the AB3550 chip so that it * will work as expected. */ -static int __init ab3550_setup(struct ab3550 *ab) +static int __devinit ab3550_setup(struct ab3550 *ab) { int err = 0; int i; @@ -1193,7 +1193,7 @@ struct ab_family_id { char *name; }; -static const struct ab_family_id ids[] __initdata = { +static const struct ab_family_id ids[] __devinitconst = { /* AB3550 */ { .id = AB3550_P1A, @@ -1205,7 +1205,7 @@ static const struct ab_family_id ids[] __initdata = { } }; -static int __init ab3550_probe(struct i2c_client *client, +static int __devinit ab3550_probe(struct i2c_client *client, const struct i2c_device_id *id) { struct ab3550 *ab; @@ -1326,7 +1326,7 @@ exit_no_detect: return err; } -static int __exit ab3550_remove(struct i2c_client *client) +static int __devexit ab3550_remove(struct i2c_client *client) { struct ab3550 *ab = i2c_get_clientdata(client); int num_i2c_clients = AB3550_NUM_BANKS; @@ -1359,7 +1359,7 @@ static struct i2c_driver ab3550_driver = { }, .id_table = ab3550_id, .probe = ab3550_probe, - .remove = __exit_p(ab3550_remove), + .remove = __devexit_p(ab3550_remove), }; static int __init ab3550_i2c_init(void)