* [PATCH] mfd: Fix section mismatch warning in wm8994
@ 2012-02-22 7:58 Axel Lin
2012-02-22 13:58 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Axel Lin @ 2012-02-22 7:58 UTC (permalink / raw)
To: linux-kernel; +Cc: Mark Brown, Ian Lartey, Dimitris Papastamos, Samuel Ortiz
Since commit 423682 "mfd: Add __devinit and __devexit annotations in wm8994",
we need to add __devinit/__devexit for wm8994_i2c_probe/wm8994_i2c_remove.
This fixes below build warnings:
WARNING: vmlinux.o(.text+0x169e44): Section mismatch in reference from the function wm8994_i2c_remove() to the function .devexit.text:wm8994_device_exit()
The function wm8994_i2c_remove() references a function in an exit section.
Often the function wm8994_device_exit() has valid usage outside the exit section
and the fix is to remove the __devexit annotation of wm8994_device_exit.
WARNING: vmlinux.o(.text+0x16a1bc): Section mismatch in reference from the function wm8994_i2c_probe() to the function .devinit.text:wm8994_device_init()
The function wm8994_i2c_probe() references
the function __devinit wm8994_device_init().
This is often because wm8994_i2c_probe lacks a __devinit
annotation or the annotation of wm8994_device_init is wrong.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
drivers/mfd/wm8994-core.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/mfd/wm8994-core.c b/drivers/mfd/wm8994-core.c
index b2de65b..0042c7c 100644
--- a/drivers/mfd/wm8994-core.c
+++ b/drivers/mfd/wm8994-core.c
@@ -670,7 +670,7 @@ static const struct of_device_id wm8994_of_match[] = {
};
MODULE_DEVICE_TABLE(of, wm8994_of_match);
-static int wm8994_i2c_probe(struct i2c_client *i2c,
+static __devinit int wm8994_i2c_probe(struct i2c_client *i2c,
const struct i2c_device_id *id)
{
struct wm8994 *wm8994;
@@ -696,7 +696,7 @@ static int wm8994_i2c_probe(struct i2c_client *i2c,
return wm8994_device_init(wm8994, i2c->irq);
}
-static int wm8994_i2c_remove(struct i2c_client *i2c)
+static __devexit int wm8994_i2c_remove(struct i2c_client *i2c)
{
struct wm8994 *wm8994 = i2c_get_clientdata(i2c);
@@ -725,7 +725,7 @@ static struct i2c_driver wm8994_i2c_driver = {
.of_match_table = wm8994_of_match,
},
.probe = wm8994_i2c_probe,
- .remove = wm8994_i2c_remove,
+ .remove = __devexit_p(wm8994_i2c_remove),
.id_table = wm8994_i2c_id,
};
--
1.7.5.4
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] mfd: Fix section mismatch warning in wm8994
2012-02-22 7:58 [PATCH] mfd: Fix section mismatch warning in wm8994 Axel Lin
@ 2012-02-22 13:58 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2012-02-22 13:58 UTC (permalink / raw)
To: Axel Lin; +Cc: linux-kernel, Ian Lartey, Dimitris Papastamos, Samuel Ortiz
[-- Attachment #1: Type: text/plain, Size: 337 bytes --]
On Wed, Feb 22, 2012 at 03:58:05PM +0800, Axel Lin wrote:
> Since commit 423682 "mfd: Add __devinit and __devexit annotations in wm8994",
> we need to add __devinit/__devexit for wm8994_i2c_probe/wm8994_i2c_remove.
> This fixes below build warnings:
This is fixed already, the relevant commit was posted along with the
original series.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-02-22 13:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-22 7:58 [PATCH] mfd: Fix section mismatch warning in wm8994 Axel Lin
2012-02-22 13:58 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox